Applicable to:
- Plesk for Linux
Question
What is the structure of the local backups in Plesk for Linux?
Answer
The Plesk backup storage is specified by the DUMP_D
variable defined in the /etc/psa/psa.conf
configuration file. The default location is /var/lib/psa/dumps
.
-
Each backup consists of:
-
<info>.xml
- file which contains settings of the server/reseller/customer/subscription, etc. -
<backup>.<tar|tgz|tzst>
- archived backup files which include website content, databases, etc. - The directory
.discovered
, which contains backup's technical information.
-
-
Backup objects hierarchy is the following:
Warning: Modifying Plesk backup structure is not recommended.
-
Root backup directory where server backups, daily dumps, subdirectories with backups of resellers, clients, and domains, etc. are stored:
CONFIG_TEXT: /var/lib/psa/dumps/
/var/lib/psa/dumps/.discovered -
Subdirectory
domains/
where backups of domains owned by the Plesk admin and objects owned by the domains are stored:CONFIG_TEXT: /var/lib/psa/dumps/domains
/var/lib/psa/dumps/domains/<domain.name>
/var/lib/psa/dumps/domains/<domain.name>/.discovered
/var/lib/psa/dumps/domains/<domain.name>/databases/
/var/lib/psa/dumps/domains/<domain.name>/sites/<domain.name> -
Subdirectory
clients/
where client's owned by admin and objects owned by the clients are stored:CONFIG_TEXT: /var/lib/psa/dumps/clients
/var/lib/psa/dumps/clients/<client.login>
/var/lib/psa/dumps/clients/<client.login>/.discovered
/var/lib/psa/dumps/clients/<client.login>/domains/<client.domain>/
/var/lib/psa/dumps/clients/<client.login>/domains/<client.domain>/.discovered
/var/lib/psa/dumps/clients/<client.login>/domains/<client.domain>/sites/<domain.name>Directories are identified by the customer's login and the domain name.
-
Subdirectory
resellers/
where backups of resellers, their clients, domains and other objects owned by resellers and resellers' clients are stored:CONFIG_TEXT: /var/lib/psa/dumps/resellers
/var/lib/psa/dumps/resellers/<reseller.login>
/var/lib/psa/dumps/resellers/<reseller.login>/.discovered
/var/lib/psa/dumps/resellers/<reseller.login>/domains/<reseller.domain>
/var/lib/psa/dumps/resellers/<reseller.login>/domains/<reseller.domain>/.discovered
/var/lib/psa/dumps/resellers/<reseller.login>/domains/<reseller.domain>/databases
/var/lib/psa/dumps/resellers/<reseller.login>/clients/<client.login>/.discovered
/var/lib/psa/dumps/resellers/<reseller.login>/clients/<client.login>/domains/<client.domain>
/var/lib/psa/dumps/resellers/<reseller.login>/clients/<client.login>/domains/<client.domain>/databases
/var/lib/psa/dumps/resellers/<reseller.login>/clients/<client.login>/domains/<client.domain>/.discovered -
The repositories are identified by reseller login, reseller's domain name, customer login and customer's domain name.
-
-
To distinguish files belonging to different backups of the same object, a specific prefix and suffix are added to the file names:
-
The
backup
is added by default. -
A suffix designating the backup creation date is always added to each backup file, and the date format is
<yymmddhhmm>
.Note: For example, the files of a backup created on 29 May 2021, 03:08 PM will have the suffix name:
2105291508
, for example:backup_info_2105291508
.
-
The list of all files included in the backup can be found via the command find
:
# find $(awk '$1=="DUMP_D"{print$2}' /etc/psa/psa.conf) -name '2105291508'
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_logs_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_info_2105291508.xml
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_conf_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/sites/sub.example.com/backup_logs_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/sites/sub.example.com/backup_conf_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/sites/sub.example.com/backup_pd_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/sites/sub.example.com/backup_statistics_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_pd_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/.discovered/backup_info_2105291508
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_apache-files_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_statistics_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_domainmail_2105291508.tgz
/var/lib/psa/dumps/clients/jdoe/domains/example.com/backup_user-data_2105291508.tgz
From the output above it is seen that this is a backup of a subscription example.com
which includes the domain example.com
and the subdomain sub.example.com
. This subscription belongs to the customer with the login jdoe
. The client belongs to Plesk administrator.
# ls -la /var/lib/psa/dumps/clients/jdoe/domains/example.com/.discovered/backup_info_2105291508/
total 56
drwxr-xr-x 2 root root 4096 May 29:15 .
drwxr-xr-x 6 root root 4096 May 29 15:08 ..
-rw-r--r-- 1 root root 20 May 29 15:08 cid_apache-files
-rw-r--r-- 1 root root 562 May 29 15:08 cid_domainmail_25
-rw-r--r-- 1 root root 408 May 29 15:08 cid_user-data
-rw-r--r-- 1 root root 113 May 29 15:08 dumpresult_SUCCESS
-rw-r--r-- 1 root root 86 May 29 15:08 object_index
-rw-r--r-- 1 root root 17204 May 29 15:08 profile.log
-rw-r--r-- 1 root root 139 May 29 15:08 props
-rw-r--r-- 1 root root 0 May 29 15:08 status_OK
-rw-r--r-- 1 root root 5 May 29 15:08 storages
Where:
-
cid_apache-files
- index of webspace files which are accessed explicitly for usersapache
orwww-data
. -
cid_domainmail_25
- index of files with mail messages. -
cid_user-data
- index of webspace files. -
object_index
- index of objects included in the backup (resellers, customers, subscriptions, domains, mailboxes, etc.).Note: The index of webspaces/files is used to determine which files should be included in the next incremental backup and from which archive the files should be extracted during restoration.
-
dumpresult_SUCCESS
:-
dumpresult_SUCCESS
. Indicates that the backup was created without issues. -
dumpresult_WARNINGS
. Provides the list of warnings that appeared during the backup creation. -
dumpresult_ERROR
. Provides the list of errors that appeared during the backup creation.
-
-
profile.log
- telemetry data. -
props
- contains backup properties. -
storages
- contains the list of repositories where the backup was created. For example,local
/ftp
, etc. -
status_OK
- indicates the backup status:-
status_OK
. Indicates a valid backup. -
status_WRONG-FORMAT
. Indicates that the*.xml
backup file is invalid. -
status_CONTENT-ERROR
. Indicates that the part oftar
archives is missing. -
status_SIGN-ERROR
. For a modified backup in which the backup signature does not match the backup content.
The following notification is shown in Plesk when clicking on the backup:Warning: This backup was created on another server or modified after creation
.
Note: The backup status file is kind of like a cache. You need to remove it to allow Plesk Backup Manager to generate a new status file.
-
In Plesk UI backups can be checked in:
-
Tools & Settings > Backup Manager:
-
Domains > example.com > Backup & Restore:
- For reseller/customer in their panel in Tools & Utilities > Backup Manager or in Domains > example.com > Backup & Restore.
The content of the auxiliary subdirectory .discovered
is not visible in Plesk. Foreign files located in the backup directories are also not visible in Plesk UI.
Comments
0 comments
Please sign in to leave a comment.