Code: Select all
/bin/sh: /root/scripts/autopostgresqlbackup: No such file or directoryCode: Select all
[root@brnxip01 nagiosxi]# cat nagiosxi.cron.d
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi
# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 8 * * * root /root/scripts/autopostgresqlbackup
Code: Select all
[root@brnxip01 nagiosxi]# cat 9-dbbackups
#!/bin/bash -e
. ./xi-sys.cfg
# Was previous step completed?
if [ ! -f installed.selinux ]; then
echo "SELinux was not configured - run previous script" >&2
exit 1
fi
# Was this step already completed?
if [ -f installed.dbbackups ]; then
echo "Database backups already configured - skipping."
exit 0
fi
mkdir -p /store/backups/mysql /store/backups/nagiosxi /root/scripts
chown "$nagiosuser:$nagiosgroup" -R /store/backups/nagiosxi
cp nagiosxi/automysqlbackup /root/scripts
echo "Database backups configured OK"
touch installed.dbbackups