Local Backups
Local backups are performed via cronjobs configured on a per server basis, depending on the files & databases required.
BookStack Backups
database:
DATE=`datebackups +%y-%m-%d`;tarare -aPperformed -cfusing /bookstack-backups/file/bookstack_file-$DATE.gzthe /var/www/BookStackmysqldump |rsynccommand, -and using a /bookstack-backups/file/bookstack_file-$DATE.gzdedicated [email protected]:/backups/bookstack/file'backup' |mysql finduser, /bookstack-backups/filewith -nameread "*.gz"only -type f -mtime +30 -deleteFiles:privilege:
DATE=`date +%y-%m-%d`; mysqldump -u root -pWilli4mthom4s. bookstack | gzip > /bookstack-backups/database/bookstack-$DATE.sql.gz | rsync -a /bookstack-backups/database/bookstack-$DATE.sql.gz [email protected]:/backups/bookstack/database | find /bookstack-backups/database -name "*.gz" -type f -mtime +30 -delete
File level backups are performed using the tar command, the zipped file is then transferred to the remote backup server via rsync:
DATE=`date +%y-%m-%d`;tar -aP -cf /bookstack-backups/file/bookstack_file-$DATE.gz /var/www/BookStack |rsync -a /bookstack-backups/file/bookstack_file-$DATE.gz [email protected]:/backups/bookstack/file | find /bookstack-backups/file -name "*.gz" -type f -mtime +30 -delete