wiki:Crin3

Version 4 (modified by chris, 3 years ago) (diff)

--

Crin3

This is a 512M RAM Debian Stretch server for running S3QL and doing backups, it was installed on see ticket:11. This server has the other 3 servers, Crin1, Crin2 and Crin4 mounted via SSHFS and it backups up selected directories using S3QL to Advania.

Retrieving backups

If you need to restore a file or database from backups first mount the SQ3L filesystem for the specific server, for example:

sudo -i
mnt-s3ql crin1

Backup process

There is a root crontab which runs the backups each night:

# m h  dom mon dow   command
01 01 * * * umnt-s3ql crin1 ; mnt-sshfs crin1 ; s3ql_backup crin1
01 02 * * * umnt-s3ql crin2 ; mnt-sshfs crin2 ; s3ql_backup crin2
01 03 * * * umnt-s3ql crin4 ; mnt-sshfs crin4 ; s3ql_backup crin4

First the S3QL file system is unmounted and checked (in case it has been manually mounted during the day) via wiki:S3QLMnt#unmnt-s3ql, then the remote server is mounted via SSHFS using wiki:SshfsMnt#mnt-sshfs and then the backup is run using a modified version of the S3QL backup script, wiki:S3QLBackup#s3ql_backup, this reads files with lists of directories to backup from /etc/s3ql/ and calls the expire_backups script to delete old backups.

The contents of the files in /etc/s3ql:

crin1

/usr/local
/etc
/home
/root
/var/backups
/var/www
/var/spool/cron/crontabs

crin2

/root
/etc
/home
/var/www
/var/backups
/usr/local
/var/spool/cron/crontabs

crin4

/home
/etc
/root
/var/www
/usr/local
/var/spool/cron/crontabs