# Taking and restoring a full cPanel backup

Source: <https://beta.dedicated.com.tr/en/kb/cpanel-full-backup-and-restore>  
Last updated: 2026-11-28

After connecting to the server over SSH as **root**, you can take a full backup of every cPanel account with these commands:

```bash
cd /home/
for b in $(ls /var/cpanel/users); do /scripts/pkgacct $b;done
```

### Restoring the backups

To restore the backups:

```bash
cd /home/
for r in $(ls | grep tar.gz | cut -d- -f2 | cut -d. -f1); do /scripts/restorepkg $r;done
```
