Próbáljuk ki a szkriptet:
/usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf
A képernyőn ez látható:
Parsed config file "/etc/automysqlbackup/automysqlbackup.conf" # Checking for permissions to write to folders: base folder /backup ... exists ... ok. backup folder /backup/mariadb ... exists ... writable? yes. Proceeding.
Kicsit megtévesztő lehet, hogy az automysqlbackup.conf fájlra hivatkozik, de minden paramétert figyelembe vesz, amelyet a myserver.conf fájlban beállítottunk. A megadott e-mail címre pedig az alábbi levél érkezett:
checking directory "/backup/mariadb/daily" ... creating ... success. checking directory "/backup/mariadb/weekly" ... creating ... success. checking directory "/backup/mariadb/monthly" ... creating ... success. checking directory "/backup/mariadb/latest" ... creating ... success. checking directory "/backup/mariadb/tmp" ... creating ... success. checking directory "/backup/mariadb/fullschema" ... creating ... success. checking directory "/backup/mariadb/status" ... creating ... success. Cleaning up latest directory ... success. # Testing for installed programs pbzip2 ... found. mysql ... found. mysqldump ... found. mail ... found. # Parsing databases ... done. ====================================================================== AutoMySQLBackup version 3.0 http://sourceforge.net/projects/automysqlbackup/ Backup of Database Server - webserver.comega7.local Databases - drupal,ilias,joomla,moodle,mysql,wordpress Databases (monthly) - drupal,ilias,joomla,moodle,mysql,wordpress ====================================================================== ====================================================================== Dump full schema. Rotating 4 month backups for ====================================================================== ====================================================================== Dump status. Rotating 4 month backups for ====================================================================== Backup Start Time Mon Dec 21 11:17:05 CET 2015 ====================================================================== Daily Backup ... Daily Backup of Database ( drupal ) Rotating 6 day backups for drupal ---------------------------------------------------------------------- Daily Backup of Database ( ilias ) Rotating 6 day backups for ilias ---------------------------------------------------------------------- Daily Backup of Database ( joomla ) Rotating 6 day backups for joomla ---------------------------------------------------------------------- Daily Backup of Database ( moodle ) Rotating 6 day backups for moodle ---------------------------------------------------------------------- Daily Backup of Database ( mysql ) Rotating 6 day backups for mysql ---------------------------------------------------------------------- Daily Backup of Database ( wordpress ) Rotating 6 day backups for wordpress ---------------------------------------------------------------------- Backup End Time Mon Dec 21 11:17:14 CET 2015 ====================================================================== Total disk space used for backup storage... Size - Location 1.7M /backup/mariadb ======================================================================
Azaz a program szemmel láthatóan teszi a dolgát. Érdemes belenézni a /backup/mariadb mappába is, hogy milyen mappastruktúrában készült el az adatbázisok mentése. Innentől pedig Rád van bízva, hogy az elmentett adatbázis-fájlokkal mit teszel a továbbiakban (például az rsync segítségével a teljes /backup/mariadb mappát átlövöd egy másik szerverre).