One of the most important job for a system administrator is to back up data regularly. If the system crashes, the system administrator could restore it on time.
In Zdoo, configurations, modified codes, the database, and files will be backed up.
1. Backup via one-click installation package
If you installed Zdoo using one-click installation packages, the easiest way to back up is to back up the whole directory of the installation package. Note: Stop Apache and MySQL service before you back up data in Zdoo, for complete data back up.
For Windows one-click installation package, back up the whole directory of /xampp and refer to One-click Installation Package for Windows (Recommended).
For Linux one-click installation package, back up /opt/zbox/data/mysql/ranzhi(pro) and /opt/zbox/app/ranzhi(pro) , and refer to One-click Installation Package for Linux.
2. Back up manually
2.1 Back up configurations, modified codes and files
Configurations are set in ranzhi/config/my.php
Files are in the directory ranzhi/www/data/
Modified codes are in the directory ranzhi
Back up configurations, files and modified codes is to back up the whole directory of ranzhi.
2.2 Back up the database
2.2.1 Back up the original database files directly
Find the directory data in MySQL. For Windows, it is in the installation directory. For Linux, it is in /var/mysql or /var/db.
In the directory data, there is ranzhi which stores the original database files. Copy this directory to back up. For Linux, be ware of permissions.
2.2.2 Export database backup
Use the tool built in MySQL, and export the database. Run mysqldump -u xxx -p ranzhi > ranzhi.sql and change -u (user) to the actual username.
3. Backup feature in Zdoo-Admin and Cron (scheduled tasks)
Log in Zdoo as the super admin, and go to Admin->System->Backup.
Click Backup button at the upper right to back up and you will see the backup information as listed. Click Set on-hold days and you can set how long the backup will be saved.
Go to Admin->System->Cron, and turn on the auto backup. You can set the time and frequency to back up.