3 # Copyright (C) 2011 Joerg Jaspert <joerg@debian.org>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; version 2.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
30 rm -f "${HOME}/sync.lock"
32 trap cleanup EXIT TERM HUP INT QUIT
34 # not using $lockdir as thats inside the rsync dir, and --delete would
35 # kick the lock away. Yes we could exclude it, but wth bother?
37 # Also, NEVER use --delete-excluded!
38 if lockfile -r3 ${HOME}/sync.lock; then
41 --exclude backup/*.xz \
42 --exclude backup/dump* \
46 --exclude=lost+found/ \
47 --exclude .da-backup.trace \
51 -e 'ssh -o ConnectTimeout=30 -o SetupTimeout=30' \
52 ftpmaster-sync:/srv/ftp-master.debian.org/ .
58 --exclude=lost+found/ \
59 --exclude .da-backup.trace \
60 --exclude web-users/ \
64 -e 'ssh -o ConnectTimeout=30 -o SetupTimeout=30' \
65 ftpmaster-sync2:/srv/ftp.debian.org/ .
68 echo "Couldn't get the lock, not syncing"
73 ## ftpmaster-sync is defined in .ssh/config as:
75 # Hostname franck.debian.org
77 # IdentityFile ~dak/.ssh/syncftpmaster
80 # StrictHostKeyChecking yes
81 # PasswordAuthentication no
84 ## ftpmaster-sync2 is the same, just a second ssh key