If you are trying to migrate or restore from a backup and see an error like the one shown below it indicates that the backup is not recoverable. This occur if the backup is corrupted/incomplete or that the provided path to the backup was incorrect.
Restoring /usr/local/mediacp/htdocs/
tar: htdocs.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
ERROR! Invalid backup package contents
Restore FAILED.
Check Backup for Necessary Files
You can check the backup to ensure it has the necessary files by running:
tar -tvf backupfilename.tar
This should provide you with an output that includes the following:
-rw-r--r-- root/root 22384640 2024-11-11 03:01 database.tar
-rw-r--r-- root/root 233277440 2024-11-11 03:01 htdocs.tar
-rw-r--r-- root/root 30720 2024-11-11 03:01 letsencrypt.tar
-rw-r--r-- root/root 20480 2024-11-11 03:01 config.tar
If you are using a full backup that includes content, you will also see the full contentdir directory.
If those .tar files are missing the backup is incomplete and may fail to complete, you should create a new backup or use another that you can confirm has the correct files.
If the files are all there the backup is likely complete, and the issue is being caused by something else.
Ensure the Correct Path is Used
You can also see this error if the provided path to the backup was incorrect. When asked during the restore, the path should include /root/ as well as .tar for example: /root/mediacp202412190042.tar
If you continue to see issues even when using the correct path and confirming the file was valid, please contact our helpdesk: Open Support Ticket