Difference between revisions of "SAC:Backups"

From OSGeo
Jump to: navigation, search
(New (from migration document).)
 
(current cron jobs for backups: update backup.cron contents.)
Line 6: Line 6:
 
/etc/cron.d/backup.cron
 
/etc/cron.d/backup.cron
  
  #### Backup cron jobs  
+
#### Backup cron jobs  
  # min hour day month dayofweek user command
+
# min hour day month dayofweek user command
  #
+
#
  # Daily rsync to /home/back
+
# 2am: Daily rsync to /home/back
  # /etc
+
05 2 * * * root /root/scripts/daily.sh
  05 10 * * * root /usr/bin/rsync -a --delete /etc/ /home/back/etc/
+
  # /var/www/html
+
  08 10 * * * root /usr/bin/rsync -a --delete /var/www/html/ /home/back/html/
+
  # Every 3 hours
+
  # /var/lib/mailman
+
  20 */3 * * * root /usr/bin/rsync -a --delete /var/lib/mailman/ /home/back/mailman/
+
  # /etc/mysql-zrm
+
  33 */3 * * * root /usr/bin/rsync -a --delete /etc/mysql-zrm/ /home/back/etc/mysql-zrm/
+
  # /var/lib/mysql-zrm
+
  34 */3 * * * root /usr/bin/rsync -a --delete /var/lib/mysql-zrm/ /home/back/mysql-zrm/
+
  # call backup_trac_svn.sh to backup
+
  # subversion /var/www/svn/repos
+
  # trac /var/www/trac
+
  
  0 1 * * * root /root/scripts/backup_svn_full.sh
+
# Every 3 hours
  45 */3 * * * root /root/scripts/backup_svn_incremental.sh
+
# /etc/mysql-zrm
  45 */3 * * * root /root/scripts/trac_backup.pl
+
#33 */3 * * * root /usr/bin/rsync -a --delete /etc/mysql-zrm/ /home/back/etc/mysql-zrm/
 +
# /var/lib/mysql-zrm
 +
#34 */3 * * * root /usr/bin/rsync -a --delete /var/lib/mysql-zrm/ /home/back/mysql-zrm/
 +
# call backup_trac_svn.sh to backup
 +
# subversion /var/www/svn/repos
 +
# trac /var/www/trac
 +
45 */3 * * * root /root/scripts/backup_svn_incremental.sh
 +
#45 */3 * * * root /root/scripts/trac_backup.pl
 +
#45 */3 * * * root /root/scripts/backup_trac_svn.sh
  
  # once a day rsync /home/back to osgeo2.osgeo.net
+
# Thisdoes some hourly drupal/mysql optimization
  0 22 * * * root /root/scripts/rsync_back.pl
+
39 * * * * root /root/scripts/drupal_cron.sh
  
 
backup script are in /root/scripts
 
backup script are in /root/scripts

Revision as of 08:04, 12 December 2007

Backups

osgeo1 (primary peer1 host)

current cron jobs for backups

/etc/cron.d/backup.cron

#### Backup cron jobs 
# min hour day month dayofweek user command
#
# 2am: Daily rsync to /home/back
05 2 * * * root /root/scripts/daily.sh
# Every 3 hours 
# /etc/mysql-zrm
#33 */3 * * * root /usr/bin/rsync -a --delete /etc/mysql-zrm/ /home/back/etc/mysql-zrm/
# /var/lib/mysql-zrm
#34 */3 * * * root /usr/bin/rsync -a --delete /var/lib/mysql-zrm/ /home/back/mysql-zrm/
# call backup_trac_svn.sh to backup 
# subversion /var/www/svn/repos
# trac /var/www/trac
45 */3 * * * root /root/scripts/backup_svn_incremental.sh
#45 */3 * * * root /root/scripts/trac_backup.pl
#45 */3 * * * root /root/scripts/backup_trac_svn.sh
# Thisdoes some hourly drupal/mysql optimization
39 * * * * root /root/scripts/drupal_cron.sh

backup script are in /root/scripts

backup_svn_incremental.sh runs every 3 hours and only dumps what has changed in the repository in the last three hours to /home/back/svn_backup/project/incremental

backup-svn_full.sh runs once a day at 1 am and does a 'svnadmin hotcopy' of the repository in /home/back/svn_backup/project/full. 14 copies of the repository are kept.

When adding a new svn repository, make sure to edit both the _full and _incremental scripts to add backups for your projects. You will also have to create the /home/back/svn_backup/project/{full,incremental} directories or the scripts will not work. rsync_back rsyncs www.osgeo.org/home/back with test.osgeo.net/home/back (the second PEER1 server)

Daily tape backup

  • PEER1 is doing daily tape backup of entire system

Mysql

MySQL is being backed up using MySQL-zrm

osgeo2 (test.osgeo.net)

The only

download.osgeo.org

As noted in Download Server the contents of download.osgeo.org are rsync'ed to osgeo2.