Symptoms
-
A backup cannot be restored in Pleks with the following error:
Archive error: Unable to extract files from /var/lib/psa/dumps/domains/example.com/backup_user-data_1805242210.tar to /var/www/vhosts/example.com: /bin/tar: httpdocs/administrator/backups/index.html: Cannot open: File exists
/bin/tar: httpdocs/administrator/cache/index.html: Cannot open: File exists
/bin/tar: httpdocs/administrator/components/com_admin/admin.admin.php: Cannot open: File exists
/bin/tar: httpdocs/administrator/components/com_admin/index.html: Cannot open: File exists
/bin/tar: httpdocs/administrator/components/com_admin/admin.admin.html.php: Cannot open: File exists
/bin/tar: httpdocs/administrator/components/com_admin/toolbar.admin.php: Cannot open: File exists
Archive error: Unable to extract files from /var/lib/psa/dumps/domains/example.com/backup_user-data_1805242210.tar to /var/www/vhosts/example.com: /bin/tar: /var/lib/psa/dumps/: Permission denied
/bin/tar: Error is not recoverable: exiting now
Cause
Backup Manager cannot create files as user due to insufficient permissions. Permissions on these folders forbid the owner to create files - there is no w
(write) atribute:
# ls -ld /var/www/vhosts/example.com/httpdocs/administrator/
dr-xr-xr-x 2 user psacln 4096 Jun 8 18:30
Resolution
-
Connect to the server via SSH.
-
Restore the backup manually from the corresponding archive:
# set +v | tar -f /var/lib/psa/dumps/domains/example.com/backup_user-data_1805242210.tar -xvm --same-permissions --same-owner -C /var/www/vhosts/example.com --wildcards --anchored