Merge branch 'dev' | Fix rsync command line and excludes.
This commit is contained in:
commit
46dddc7359
|
@ -93,8 +93,7 @@ In /etc/evobackup:
|
||||||
commented out. Un-comment or write your own code, this will be launched
|
commented out. Un-comment or write your own code, this will be launched
|
||||||
before the rsync, using run-parts.
|
before the rsync, using run-parts.
|
||||||
|
|
||||||
* What to include in conf.d/include.cf
|
* What to backup using rsync filter rules in conf.d/include.cf
|
||||||
* What to exclude in conf.d/exclude.cf
|
|
||||||
* General config in conf.d/cron.cf
|
* General config in conf.d/cron.cf
|
||||||
|
|
||||||
6) Optional, test with sh -x.
|
6) Optional, test with sh -x.
|
||||||
|
|
|
@ -20,21 +20,11 @@ system=$(uname -o)
|
||||||
hostname=$(hostname -f)
|
hostname=$(hostname -f)
|
||||||
start=$(date --rfc-3339=seconds)
|
start=$(date --rfc-3339=seconds)
|
||||||
tmplog=$(mktemp --tmpdir=/tmp evobackup.XXX)
|
tmplog=$(mktemp --tmpdir=/tmp evobackup.XXX)
|
||||||
if [ "$system" = "GNU/Linux" ]; then
|
|
||||||
rep="/bin /boot /lib /opt /sbin /usr"
|
|
||||||
elif [ "$system" = "FreeBSD" ]; then
|
|
||||||
rep="/bsd /bin /boot /sbin /usr"
|
|
||||||
else
|
|
||||||
# Not GNU/Linux or FreeBSD
|
|
||||||
rep=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# rsync command line to backup all data.
|
# rsync command line to backup all data.
|
||||||
rsync -avz --delete --force --ignore-errors --partial \
|
rsync -avz --force --ignore-errors --partial \
|
||||||
--exclude-from=/etc/evobackup/conf.d/exclude.cf \
|
|
||||||
--include-from=/etc/evobackup/conf.d/include.cf \
|
--include-from=/etc/evobackup/conf.d/include.cf \
|
||||||
$rep \
|
--delete --delete-excluded / -e "ssh -p $SSHPORT -4" \
|
||||||
-e "ssh -p $SSHPORT -4" \
|
|
||||||
root@${BACKUPSERVER}:/var/backup/ > $tmplog
|
root@${BACKUPSERVER}:/var/backup/ > $tmplog
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
lost+found
|
|
||||||
.nfs.*
|
|
||||||
/var/log
|
|
||||||
/var/log/evobackup*
|
|
||||||
/var/lib/mysql
|
|
||||||
/var/lib/postgres
|
|
||||||
/var/lib/postgresql
|
|
||||||
/var/lib/sympa
|
|
||||||
/var/lib/metche
|
|
||||||
/var/run
|
|
||||||
/var/lock
|
|
||||||
/var/state
|
|
||||||
/var/apt
|
|
||||||
/var/cache
|
|
||||||
/usr/src
|
|
||||||
/usr/doc
|
|
||||||
/usr/share/doc
|
|
||||||
/usr/obj
|
|
||||||
dev
|
|
||||||
/var/spool/postfix
|
|
||||||
/var/lib/amavis/amavisd.sock
|
|
||||||
/var/lib/munin/munin-update.stats.tmp
|
|
||||||
/var/lib/php5
|
|
||||||
/var/spool/squid
|
|
|
@ -1,5 +1,34 @@
|
||||||
/etc
|
# Use this file to exlude files (-) or explicit include (+).
|
||||||
/root
|
# Exemple, backup /home/backup/mysql.bak.gz but not what is left in /home/backup
|
||||||
/var
|
# + /home/backup/mysql.bak.gz
|
||||||
/home
|
# - /home/backup/**
|
||||||
/srv
|
|
||||||
|
# General excludes.
|
||||||
|
- lost+found
|
||||||
|
- .nfs.*
|
||||||
|
- /backup
|
||||||
|
- /dev
|
||||||
|
- /proc
|
||||||
|
- /selinux
|
||||||
|
- /run
|
||||||
|
- /sys
|
||||||
|
- /usr/src
|
||||||
|
- /usr/doc
|
||||||
|
- /usr/share/doc
|
||||||
|
- /usr/obj
|
||||||
|
- /var/log
|
||||||
|
- /var/lib/mysql
|
||||||
|
- /var/lib/postgres
|
||||||
|
- /var/lib/postgresql
|
||||||
|
- /var/lib/sympa
|
||||||
|
- /var/lib/metche
|
||||||
|
- /var/run
|
||||||
|
- /var/lock
|
||||||
|
- /var/state
|
||||||
|
- /var/apt
|
||||||
|
- /var/cache
|
||||||
|
- /var/spool/postfix
|
||||||
|
- /var/lib/amavis/amavisd.sock
|
||||||
|
- /var/lib/munin/munin-update.stats.tmp
|
||||||
|
- /var/lib/php5
|
||||||
|
- /var/spool/squid
|
Loading…
Reference in a new issue