![]() |
|
Guide How to Restore a Site From a CloudPanel Backup (Files and Database) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel) +---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials) +----- Forum: CloudPanel Backups & Migration Guides (https://adminsforum.com/Forum-cloudpanel-backups-migration-guides) +----- Thread: Guide How to Restore a Site From a CloudPanel Backup (Files and Database) (/Thread-guide-how-to-restore-a-site-from-a-cloudpanel-backup-files-and-database) |
How to Restore a Site From a CloudPanel Backup (Files and Database) - JAY - 10-23-2026 How to restore a site from a CloudPanel backup (files and database) A backup is only worth something if you can restore it. This guide walks through restoring a CloudPanel site, step by step: getting the backup file, putting the files back and importing the database. If your backups aren't being created at all, start with CloudPanel backups not running. What a CloudPanel backup contains CloudPanel's remote backups (set up under Admin Area > Backups) contain each site's vhost and its entire home directory, except the Code: .sshCode: logsCode: tmpBefore you start
Step 1: Get the backup file Download the backup for the right date from your storage provider (for example the Dropbox Code: Apps/CloudPanel/Code: backup.tarStep 2: Upload it to the site's tmp folder
Step 3: Extract it as the site user Log in over SSH as the site user (not root, so file ownership stays correct): Code: cd ~/tmp
tar xf backup.tar
ls -laCode: htdocs/example.comCode: *.sqlCode: *.sql.gzStep 4: Restore the files You can restore everything, or just what you need (for example one deleted folder). To replace the whole site: Code: rsync -a --delete ~/tmp/PATH-TO/htdocs/example.com/ ~/htdocs/example.com/Code: PATH-TOCode: --deleteStep 5: Restore the database If you found a database dump, import it as root with clpctl: Code: clpctl db:import --databaseName=my_database --file=/home/siteuser/tmp/PATH-TO/my_database.sql.gzCode: .sqlCode: .sql.gzNo dump in the backup? Look for database dumps elsewhere in the site user's home folder ( Code: ls -R ~ | grep -E '\.sql(\.gz)?$'Code: clpctl db:export --databaseName=my_database --file=/home/siteuser/db-backups/my_database.sql.gzStep 6: Check and clean up
Test restores before you need them The best time to learn this is on a quiet day. Restore a recent backup to a test subdomain once a month. If it works there, it'll work when it matters. Sources: CloudPanel: remote backups ยท CloudPanel: clpctl db:import More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace Code: example.comCode: siteuser |