Backups are necessary for quickly restoring the control panel in case of a failure. For example, due to server issues or after erroneous irreversible actions in the control panel.
A DNSmanager 6 backup includes:
- DNSmanager configuration file (by default /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf);
- DNSmanager database dump;
- PowerDNS configuration file:
- AlmaLinux: /etc/pdns/pdns.conf;
- Ubuntu: /etc/powerdns/pdns.conf;
- Configuration files for domain name spaces:
- AlmaLinux: /etc/pdns/pdns-*.conf;
- Ubuntu: /etc/powerdns/pdns-*.conf;
To create a backup, you need to create an archive with these files.
We recommend storing backup archives in an external storage. For example, on an external drive, on a cloud storage, or on a file server.
You can restore the control panel state from a backup on another server. See more details in the article How to move DNSmanager between servers.
How to create a backup
- Connect to the server with the control panel via SSH. For more information about connecting via SSH, see Workstation setup.
- If you are creating a backup of this control panel for the first time, create a folder for the required files:
mkdir backup - Copy the configuration file to the backup folder:
cp /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf /backup/ -
Create a DNSmanager database dump:
mysqldump dnsmgr > dump.sql - Copy the dump to the backup folder:
cp dump.sql /backup/ - Copy the PowerDNS configuration file. The file location depends on the server's OS: AlmaLinux
cp /etc/pdns/pdns.conf /backup/Ubuntucp /etc/powerdns/pdns.conf /backup/Astra Linuxcp /opt/ispsystem/etc/pdns.conf /backup/ - Copy the configuration files for domain name spaces. The file locations depend on the server's OS: AlmaLinux
cp /etc/pdns/pdns-*.conf /backup/Ubuntucp /etc/powerdns/pdns-*.conf /backup/ - Create an archive with the contents of the backup directory. We recommend including the date and time of the backup creation in the filename. For example, you can name the backup archive in the
YYYY_MM_DD__HH_MM.tar.gzformat:
tar -czf YYYY_MM_DD__HH_MM.tar.gz /backupExplanation -
Copy the archive to external storage. For example, to a file server:
scp </path/to/local_file> <user>@<domain>:</path/to/remote_file>Explanation - Delete the contents of the backup file directory:
rm -rf /backup/*
How to restore the control panel from a backup
- Connect to the server with the control panel via SSH. For more information about connecting via SSH, see Workstation setup.
- Copy the backup archive from external storage. Example command for copying from a file server:
scp <user>@<domain>:</path/to/remote_file> </path/to/local_file>Explanation - Extract the archive into a directory for the backup files:
tar -xzf <path to archive file> -C /backup_restore/ - Copy the configuration file to the default directory:
cp /backup_restore/dnsmgr.conf /opt/ispsystem/dnsmanager6/etc/ -
Import the database from the dump:
mysql dnsmgr < /backup_restore/dump.sql - Copy the PowerDNS configuration file. The file location depends on the server's OS: AlmaLinux
cp /backup_restore/pdns.conf /etc/pdns/Ubuntucp /backup_restore/pdns.conf /etc/powerdns/ - Copy the configuration files for domain name spaces. The file locations depend on the server's OS: AlmaLinux
cp /backup_restore/pdns-*.conf /etc/pdns/Ubuntucp /backup_restore/pdns-*.conf /etc/powerdns/Astra Linuxcp /backup_restore/pdns-*.conf /opt/ispsystem/etc/ - Delete the contents of the backup file directory:
rm -rf /backup_restore/*
You may find this useful
Related articles:
En
Es