getBackupSettings — Retrieving backup settings
The getBackupSettings
method retrieves the current backup configuration settings for a site.
The API endpoint is:
https://api.sitelock.com/v1/partner
Request format
-
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
-
partner: (Optional) The brand name to use in messaging
-
-
getBackupSettings: The method name
-
site_id: The ID of the site for which to retrieve the settings
-
-
Response format
-
SiteLockOnlineResponse: This element is used to delineate the full API response.
-
getBackupSettings: The method name
-
backup_db: The backup website’s database
-
db_host: The hostname or IP address of the FTP server
-
db_type: The database type (for example, MySQL)
-
db_user: The database username
-
ftp_settings: The FTP server settings
-
ftp_host: The hostname or IP address of the FTP server
-
ftp_timeout: The number of seconds the server waits before closing the connection
-
ftp_user: The FTP username for the file download process. For security purposes, the password isn’t returned.
-
port: The port that the FTP/SFTP server is running on
-
protocol: The file transfer protocol. The possible values are
ftp
,sftp
, andftps
. -
connection_err_msg: This element is present when the FTP connection has failed.
-
ssh_pub_key: An SSH public key. This element is present when an SSH key pair exists on SiteLock for access through the SFTP protocol.
-
-
pending_backup: This element is present when a file backup event is pending or in progress. No backup or SMART configuration settings can be changed while
pending_backup
returns1
. -
root_dir: The directory where the website is installed.
-
selected_schemas: A list of website’s database schemas to back up
-
schema: The database schema
-
-
status: The status of the Backup Database service
-
active: The Backup Database service is an active state
-
inactive: The Backup Database service is suspended
-
-
web_url: The URL of the website. The URL starts with
http://
orhttps://
, and can be a domain, subdomain, or subdirectory.
-
-
backup_files: The backup website’s files
-
backup_root: The directory where the website is installed.
-
excluded_dirs: The directories excluded from backup
-
excluded_exts: The filename extensions excluded from backup
-
excluded_files: The files excluded from backup
-
exclude_size_kb: The file excluded from backup based on size in kilobytes (KB)
-
ftp_settings: The FTP server settings
-
ftp_host: The hostname or IP address of the FTP server
-
ftp_timeout: The number of seconds the server should wait before closing the connection
-
ftp_user: The FTP username for the file download process. For security purposes, the password isn’t returned.
-
port: Specify if the FTP/SFTP server is running on a non-default port (default ports are
21
for FTP,22
for SFTP) -
protocol: The file transfer protocol. The possible values are
ftp
,sftp
, andftps
. -
connection_err_msg: This element is present when the FTP connection has failed.
-
ssh_pub_key: An SSH public key. This element is present when an SSH key pair exists on SiteLock for access through the SFTP protocol.
-
-
pending_backup: This element is present when a database backup event is pending or in progress. No backup or SMART configuration settings can be changed while
pending_backup
returns1
. -
status: The status of the Backup Files service:
-
active: The Backup Files service is an active state
-
inactive: The Backup Files service is suspended
-
-
-
site_id: The ID of the site for which the settings were retrieved
-
-
The |
Example response
<SiteLockOnlineResponse>
<getBackupSettings>
<backup_db>
<db_host>localhost</db_host>
<db_type>MySQL</db_type>
<db_user>john_doe</db_user>
<ftp_settings>
<ftp_host>ftp.ipower.com</ftp_host>
<ftp_timeout>1800</ftp_timeout>
<ftp_user>john_doe</ftp_user>
<port>21</port>
<protocol>ftp</protocol>
<status>active</status>
</ftp_settings>
<pending_backup>1</pending_backup>
<root_dir>./public_html/<root_dir>
<selected_schemas>
<schema>sitelock_10</schema>
</selected_schemas>
<status>inactive</status>
<web_url>https://example.com/</web_url>
</backup_db>
<backup_files>
<backup_root>./public_html/</backup_root>
<exclude_dirs></exclude_dirs>
<exclude_exts></exclude_exts>
<exclude_files></exclude_files>
<exclude_size_kb></exclude_size_kb>
<ftp_settings>
<ftp_host>ftp.ipower.com</ftp_host>
<ftp_timeout>1800</ftp_timeout>
<ftp_user>john_doe</ftp_user>
<port>21</port>
<protocol>ftp</protocol>
<status>active</status>
</ftp_settings>
<pending_backup>1</pending_backup>
<status>active</status>
</backup_files>
<site_id>10900</site_id>
</getBackupSettings>
</SiteLockOnlineResponse>