Backups provide a snapshot of the MediaCP servers database, media contents and important configuration files (including SSL Certificates), allowing for a complete recovery in the event of a hardware failure or other disaster.
A backup of the database (only) is created automatically every time you upgrade the software, and by default all backups are stored in the /backup path on your system.
It is recommended to take regular complete backups of the MediaCP and store these offsite where possible.
Backup Package & Structure
The backup package file is described below, enabling an administrator to create a compatible package for the restoration process if necessary.
Please note any tar files should contain relative paths and not full paths. For example, when taking a backup of the content path, change directory to /usr/local/mediacp/content first. Likewise with /usr/local/mediacp/htdocs for the htdocs.tar file.
The backup file is an uncompressed .tar file containing the following files:
- mediacp.sql (mysql dump file)
- htdocs.tar (containing entire /usr/local/mediacp/htdocs/)
- config.tar containing
- content.tar – Optionally included tar of the /usr/local/mediacp/content path
- letsencrypt.tar – Optionally included if letsencrypt is enabled.
- tar of /usr/local/mediacp/letsencrypt/
- contentdir – text file containing the content path (/usr/local/mediacp/content/)