Terapix Star Formation Region IC 1396, © 2001 CFHT
Backups policy / organisation
Article
by FMA - Updated August 3rd, 2007

4 kinds of backup (all done through cronjobs):

-  rsync without deletion: the source directory is replicated to the target directory. Pre-existing files/dir on the target dir remain, even if deleted on the source dir. Modified files (e.g. zeroed files) are updated. So, a `rm source_dir/file` can me recovered, but a `echo "" > source_dir/file` cannot.

-  rsync --delete: the target directory is a miror of the source one (files with do not exist anymore on the source one are deleted). Useful to recover the same state of a directory after a disk crash

-  incremental (mysqlblasy for mysql, rdiff-backup for web repository): the whole data are saved, and it is possible to recover the state over one month back (according to the conf, your mileage might vary)

-  external backup (using terapix free account) (« Attention : Ceci n'est en aucun cas un espace de stockage et/ou de sauvegarde personnelle. Tel que défini dans les Conditions d'Utilisation du service, et par la loi, tout compte illicite ou consideré comme espace de stockage sera immédiatement supprimé avec l'intégralité de son contenu. »)

-  terapix.iap.fr:

Saved dirs:

  • mysql's databases (mysqlblasy): BANDE, DBCADC, DBCATALOG, DBTERAPIX, DBTRANSFERT, GeneriCart, Photometry, elixir, phpgroupware -> /data1/SAVE/mysql/
  • /data1/SAVE/mysql (rsync --delete) -> /data/fcix3/raid/backups/terapix/mysqlblasy/

crontab:

16 1 * * * root /usr/local/bin/mysqlblasy.pl -c /usr/local/etc/mysqlblasy.conf; if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /data1/SAVE/mysql/ pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/terapix/mysqlblasy/; fi

  • /var/www (rdiff-backup) except /var/www/CACHE -> /data1/SAVE/web/
  • /data1/SAVE/web/ (rsync --delete) -> /data/fcix3/raid/backups/terapix/www_rdiff/

crontab:

17 1 * * * root /usr/bin/rdiff-backup -v 2 --exclude /var/www/CACHE /var/www /data1/SAVE/web/; if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /data1/SAVE/web/ pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/terapix/www_rdiff/; fi

  • /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache (rsync) -> /data1/backups_nodelete/
  • /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache (rsync) -> /data/fcix3/raid/backups/terapix_nodelete/

crontab:

30 0,12 * * * root /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache /data1/backups_nodelete/
0 0,12 * * * root if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/terapix_nodelete/; fi

  • /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache (rsync --delete) -> /data1/backups/
  • /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache (rsync --delete) -> /data/fcix3/raid/backups/terapix/

crontab:

0 0,12 * * * root /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache /data1/backups/
30 0,12 * * * root if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /var/www /var/local/svn /var/lib/mysql /etc /var/log/apache pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/terapix/; fi

-  fcix3: backups to free: choose orthogonal times with respect to mix's crontab

# cat /root/.weexrc
[free_terapix1_mysqlblasy]
 HostName = ftpperso.free.fr
 LoginName = terapix
 Password = ''
 RenameOK = true
 ShowHiddenFile = true
 SrcDir = /data/fcix3/raid/backups/terapix/mysqlblasy/
 DestDir = /mysqlblasy/

[free_terapix1_www]
 HostName = ftpperso.free.fr
 LoginName = terapix
 Password = ''
 RenameOK = true
 ShowHiddenFile = true
 SrcDir = /data/fcix3/raid/backups/terapix/www/
 DestDir = /www/

[free_terapix2_dbterapix_mysqlblasy]
 HostName = ftpperso.free.fr
 LoginName = terapix2
 Password = ''
 RenameOK = true
 ShowHiddenFile = true
 SrcDir = /data/fcix3/raid/backups/dbterapix/mysqlblasy/
 DestDir = /mysqlblasy_dbterapix/

[default]
AsciiFile = {
*.html
*.txt
}
# crontab -l | grep weex
15 6 * * * weex --silent free_terapix1_mysqlblasy free_terapix2_dbterapix_mysqlblasy free_terapix1_www

-  clix sauvegarde disque miroir: à réactiver.

-  dbterapix: NB: clix root's ssl keys exported to all nodes and added to pipeline's authorized_keys

  • mysql tables pmadb, mysql, dbspica, T0002, T0003, Photometry, EfigiManClass, DBTRANSFER saved to /var/db/backup/ and (rsync --delete) -> /data/fcix3/raid/backups/dbterapix/mysqlblasy/

dbterapix ~ # crontab  -l | grep mysqlblasy
0 0 * * * /usr/local/bin/mysqlblasy.pl -c /usr/local/etc/mysqlblasy.conf; if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /var/db/backup/ pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/dbterapix/mysqlblasy/; fi

-  efigix:

  • mysql tables pmadb,mysql,EfigiManClass saved to /var/db/backup/ and (rsync --delete) -> /data/fcix3/raid/backups/efigix/mysqlblasy/

dbterapix ~ # crontab  -l | grep mysqlblasy
00 02 * * * /usr/local/bin/mysqlblasy.pl -c /usr/local/etc/mysqlblasy.conf; if ssh pipeline@fcix3.iap.fr grep -q /data/fcix3/raid /proc/mounts; then /usr/bin/nice -n 19 /usr/bin/rsync -q -av -e ssh --delete /var/db/backup/ pipeline@fcix3.iap.fr:/data/fcix3/raid/backups/efigix/mysqlblasy/; fi


Site Map  -   -  Contact
© Terapix 2003-2011