manageBackup — Managing backup
The manageBackup
method manages website backups.
A request needs to be made once for each site.
The API endpoint is:
https://api.sitelock.com/v1/partner
Request format for creating backup
-
SiteLockOnlineRequest: This element is used to delineate the full API request.
-
authentication: The partner’s username, password, and branding
-
username: The partner’s API username
-
password: The partner’s API password
-
-
manageBackup: The method name.
-
site_id: The ID of the site for which to create a backup.
-
action: The
backup
action creates a backup.-
backup: Back up the website’s database and/or files.
-
-
backup_db:(Optional) Back up the website’s database.
-
backup_files:(Optional) Back up the website’s files.
If neither
backup_db
norbackup_files
are present, then both the files and database will be backed up.
-
-
Request format for deleting backup
-
SiteLockOnlineRequest: This element is used to delineate the full API request.
-
authentication: The partner’s username, password, and branding
-
username: The partner’s API username
-
password: The partner’s API password
-
-
manageBackup: The method name.
-
site_id: The ID of the site for which to delete the backup.
-
action: The
delete
action deletes the backup to free up your quota.-
backup_id: The ID of the backup.
-
backup_files: (Optional) Delete the backup files.
-
backup_db: (Optional) Delete the backup database.
If neither
backup_db
norbackup_files
are present, then both the database backup and files backup will be deleted.
-
-
-
Request format for restoring a website from backup
-
SiteLockOnlineRequest: This element is used to delineate the full API request.
-
authentication: The partner’s username, password, and branding
-
username: The partner’s API username
-
password: (Optional) The brand name to use in messaging
-
partner: (Optional) The brand name to use in messaging
-
-
manageBackup: The method name.
-
site_id: The ID of the site for which to restore data from the backup.
-
action: The
restore
action restores your website using the data from the backup. -
backup_id: The ID of the backup.
-
backup_files: Restore the backup files.
-
files: (Optional) A list of files to restore.
-
file_id: The ID of the file. It can be obtained using the getBackupDetails method.
-
-
dirs: (Optional) A list of directories to restore.
-
dir: The directory name. It can be obtained using the getBackupDetails method.
If neither
files
nordirs
are passed in, then all files and directories will be restored.
-
-
-
backup_db: Restore the database.
Either
backup_files
orbackup_db
must be present.
-
-
Example request
<SiteLockOnlineRequest>
<authentication>
<user>Username</user>
<password>Password</password>
</authentication>
<manageBackup>
<site_id>10900</site_id>
<action>restore</action>
<backup_id>12</backup_id>
<backup_files>
<files>
<file_id>14</file_id>
</files>
<dirs>
<dir>wp-content</dir>
<dir>wp-includes</dir>
</dirs>
</backup_files>
<backup_db />
</manageBackup>
</SiteLockOnlineRequest>
Response format
-
SiteLockOnlineResponse: This element is used to delineate the full API response.
-
manageBackup: The method name.
-
backup_db: The database backup.
-
status: Either
ok
orerror
.
-
-
backup_files: The files backup.
-
status: Either
ok
orerror
.
-
-
backup_id: The ID of the backup.
-
status: Either
ok
orerror
. -
message: An error message if
status
iserror
.
-
-