2013-12-13 20:21:14 +00:00
|
|
|
#!/bin/bash
|
2016-05-19 11:16:22 +00:00
|
|
|
# backup.sh will run FROM gnome-backups01.phx2.fedoraproject.org TO the various GNOME boxes
|
|
|
|
# on the set. (there's two set of machines, one being the ones with a public IP and the others
|
|
|
|
# being the IP-less ones that will forward their agent through bastion.gnome.org)
|
2013-12-13 20:21:14 +00:00
|
|
|
|
|
|
|
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
|
|
|
|
|
2013-12-13 21:39:17 +00:00
|
|
|
MACHINES='signal.gnome.org
|
|
|
|
webapps2.gnome.org
|
2018-01-30 14:45:19 +00:00
|
|
|
palette.gnome.org
|
2013-12-13 21:39:17 +00:00
|
|
|
webapps.gnome.org
|
|
|
|
bastion.gnome.org
|
2015-01-21 16:19:45 +00:00
|
|
|
spinner.gnome.org
|
2013-12-13 21:39:17 +00:00
|
|
|
master.gnome.org
|
|
|
|
restaurant.gnome.org
|
2013-12-23 15:08:37 +00:00
|
|
|
expander.gnome.org
|
2018-02-07 14:31:49 +00:00
|
|
|
wiki.gnome.org
|
2013-12-23 15:08:37 +00:00
|
|
|
view.gnome.org
|
2018-02-06 10:17:22 +00:00
|
|
|
puppetmaster01.gnome.org
|
2014-02-15 15:03:30 +00:00
|
|
|
accelerator.gnome.org
|
2014-03-26 16:30:59 +00:00
|
|
|
range.gnome.org
|
2014-09-24 16:42:36 +00:00
|
|
|
pentagon.gimp.org
|
2015-01-15 18:56:59 +00:00
|
|
|
account.gnome.org
|
2018-02-05 11:06:30 +00:00
|
|
|
bugzilla.gnome.org
|
2016-09-27 08:30:36 +00:00
|
|
|
socket.gnome.org
|
2018-02-01 12:18:41 +00:00
|
|
|
gnome-hispano.gnome.org
|
2018-12-21 13:49:13 +00:00
|
|
|
gesture.gnome.org
|
2016-11-25 21:53:49 +00:00
|
|
|
scale.gnome.org
|
|
|
|
sdkbuilder.gnome.org
|
2018-08-20 21:08:38 +00:00
|
|
|
gitlab.gnome.org
|
2019-03-08 13:28:31 +00:00
|
|
|
oscp-master01.gnome.org
|
|
|
|
staff-mail.gnome.org'
|
2013-12-13 20:21:14 +00:00
|
|
|
|
2018-02-21 12:56:52 +00:00
|
|
|
BACKUP_DIR='/gnome_backups'
|
2013-12-13 20:21:14 +00:00
|
|
|
|
2013-12-13 21:39:17 +00:00
|
|
|
for MACHINE in $MACHINES; do
|
2013-12-28 17:46:06 +00:00
|
|
|
rsync -avz -e 'ssh -F /usr/local/etc/gnome_ssh_config' --bwlimit=2000 $MACHINE:/etc/rsyncd/backup.exclude $BACKUP_DIR/excludes/$MACHINE.exclude
|
2018-02-21 12:56:52 +00:00
|
|
|
rdiff-backup --remote-schema 'ssh -F /usr/local/etc/gnome_ssh_config %s rdiff-backup --server' --print-statistics --exclude-device-files --exclude-fifos --exclude-sockets --exclude /selinux --exclude /sys --exclude /proc --exclude-globbing-filelist $BACKUP_DIR/excludes/$MACHINE.exclude $MACHINE::/ $BACKUP_DIR/$MACHINE/ | mail -s "Daily backup: $MACHINE" backups@gnome.org
|
2015-11-10 21:01:48 +00:00
|
|
|
rdiff-backup --remove-older-than 6M --force $BACKUP_DIR/$MACHINE/
|
2013-12-13 20:21:14 +00:00
|
|
|
done
|