Import last version of zzz_evobackup and evocheck.sh scripts
This commit is contained in:
parent
f8a9a86bdd
commit
8cd6b0bda6
|
@ -32,17 +32,18 @@ SERVERS_FALLBACK=${SERVERS_FALLBACK:-1}
|
|||
# timeout (in seconds) for SSH connections
|
||||
SSH_CONNECT_TIMEOUT=${SSH_CONNECT_TIMEOUT:-90}
|
||||
|
||||
## We use /home/backup : feel free to use your own dir
|
||||
# We use /home/backup : feel free to use your own dir
|
||||
LOCAL_BACKUP_DIR="/home/backup"
|
||||
|
||||
# You can set "linux" or "bsd" manually or let it choose automatically
|
||||
SYSTEM=$(uname | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Change these 2 variables if you have more than one backup cron
|
||||
PIDFILE="/var/run/evobackup.pid"
|
||||
LOGFILE="/var/log/evobackup.log"
|
||||
# Store pid and logs in a file named after this program's name
|
||||
PROGNAME=$(basename $0)
|
||||
PIDFILE="/var/run/${PROGNAME}.pid"
|
||||
LOGFILE="/var/log/${PROGNAME}.log"
|
||||
|
||||
## Enable/Disable tasks
|
||||
# Enable/Disable tasks
|
||||
LOCAL_TASKS=${LOCAL_TASKS:-1}
|
||||
SYNC_TASKS=${SYNC_TASKS:-1}
|
||||
|
||||
|
@ -312,8 +313,9 @@ if [ "${LOCAL_TASKS}" = "1" ]; then
|
|||
${FINDMNT_BIN} > ${LOCAL_BACKUP_DIR}/findmnt.txt
|
||||
fi
|
||||
else
|
||||
## Dump network connections with netstat
|
||||
netstat -finet -atn > ${LOCAL_BACKUP_DIR}/netstat.out
|
||||
## Dump network connections with fstat
|
||||
fstat | head -1 > ${LOCAL_BACKUP_DIR}/netstat.out
|
||||
fstat | grep internet >> ${LOCAL_BACKUP_DIR}/netstat.out
|
||||
|
||||
## List OpenBSD packages
|
||||
pkg_info -m > ${LOCAL_BACKUP_DIR}/packages
|
||||
|
@ -415,6 +417,7 @@ if [ "${SYNC_TASKS}" = "1" ]; then
|
|||
--exclude "lxc/*/rootfs/var/apt" \
|
||||
--exclude "lxc/*/rootfs/var/cache" \
|
||||
--exclude "lxc/*/rootfs/var/lib/php5" \
|
||||
--exclude "lxc/*/rootfs/var/lib/php/sessions" \
|
||||
--exclude "lxc/*/rootfs/var/lock" \
|
||||
--exclude "lxc/*/rootfs/var/log" \
|
||||
--exclude "lxc/*/rootfs/var/run" \
|
||||
|
|
|
@ -108,7 +108,7 @@ check_softdep(){
|
|||
}
|
||||
|
||||
check_noatime(){
|
||||
if [ $(mount | grep -c noatime) -ne $(grep -c ffs /etc/fstab) ]; then
|
||||
if [ $(mount | grep -c noatime) -ne $(grep ffs /etc/fstab | grep -vc ^\#) ]; then
|
||||
failed "IS_NOATIME" "All partitions should be mounted with the noatime option"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue