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, and folders. They're stored with your chosen provider (S3, Wasabi, DigitalOcean Spaces, Dropbox, Google Drive, Hetzner Storage Box, SFTP or a custom Rclone remote).
Before you start
Step 1: Get the backup file
Download the backup for the right date from your storage provider (for example the Dropbox folder, your S3 bucket, or your SFTP server). You need the site's file.
Step 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):
Look around the extracted folders until you find the site files () and any database dump files ( or ).
Step 4: Restore the files
You can restore everything, or just what you need (for example one deleted folder). To replace the whole site:
Replace with the path you found in Step 3. The trailing slashes matter. Leave out if you only want to add back missing files without removing newer ones.
Step 5: Restore the database
If you found a database dump, import it as root with clpctl:
Both and work. The import replaces the current tables with the ones from the backup.
No dump in the backup? Look for database dumps elsewhere in the site user's home folder (). If there are none, start making them: a nightly cron job (the site user can run it) with keeps a fresh dump in the site's home folder, so every future backup includes your database. See clpctl cheat sheet.
Step 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 with your domain and with your site's user name (shown on the site's Settings page).
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
- Back up the current state first, even if it's broken. If the restore goes wrong, you can return to where you started: Code:
tar -czf /root/before-restore-$(date +%F).tar.gz /home/siteuser/htdocs/example.com - Put the site into maintenance mode or warn visitors if it's live.
- Know the database name and user (site > Databases).
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
- Under 2 GB: open the site's File Manager, go to the folder and uploadCode:
tmp.Code:backup.tar
- Over 2 GB: upload it with SFTP as the site user into . See CloudPanel SSH, SFTP, FTP and File Manager.Code:
~/tmp/
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
- Fix ownership in case anything was copied as root: Code:
chown -R siteuser:siteuser /home/siteuser/htdocs/example.com - Purge the Varnish cache for the site.
- Test the home page, a login, a form and the admin area.
- Delete the extracted files and backup.tar from . They take space and contain your database.Code:
~/tmp
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
- Installation failed: common install errors
- Can't log in: port 8443, password and 2FA
- Site shows 403 Forbidden or 404
- Too many redirects or mixed content after SSL
- PHP extension missing / enable ionCube
- WordPress asks for FTP or can't update plugins
- Varnish showing old pages or breaking logins
- SSH or SFTP login fails
- Node.js app shows 502 or keeps restarting
- Site hacked: find malware and clean up
- clpctl errors: not found, wrong user, quoting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace
Code:
example.comCode:
siteuser
