|
@@ -54,7 +54,6 @@ function backup_database_local {
|
54
|
54
|
|
55
|
55
|
backup_databases_script=/usr/bin/backupdatabases
|
56
|
56
|
if ! grep -q "# Backup the ${database_name} database" $backup_databases_script; then
|
57
|
|
- echo '' >> $backup_databases_script
|
58
|
57
|
echo "# Backup the ${database_name} database" >> $backup_databases_script
|
59
|
58
|
echo "TEMPFILE=/root/${database_name}.sql" >> $backup_databases_script
|
60
|
59
|
echo 'DAILYFILE=/var/backups/${database_name}_daily.sql' >> $backup_databases_script
|
|
@@ -85,7 +84,6 @@ function backup_database_local {
|
85
|
84
|
|
86
|
85
|
weekly_backup_script=/etc/cron.weekly/backupdatabasesweekly
|
87
|
86
|
if ! grep -q "Backup ${database_name}" ${weekly_backup_script}; then
|
88
|
|
- echo '' >> ${weekly_backup_script}
|
89
|
87
|
echo "# Backup ${database_name}" >> ${weekly_backup_script}
|
90
|
88
|
echo "if [ -f /var/backups/${database_name}_weekly.sql ]; then" >> ${weekly_backup_script}
|
91
|
89
|
echo " cp -f /var/backups/${database_name}_weekly.sql /var/backups/${database_name}_2weekly.sql" >> ${weekly_backup_script}
|
|
@@ -98,7 +96,6 @@ function backup_database_local {
|
98
|
96
|
|
99
|
97
|
monthly_backup_script=/etc/cron.monthly/backupdatabasesmonthly
|
100
|
98
|
if ! grep -q "Backup ${database_name}" ${monthly_backup_script}; then
|
101
|
|
- echo '' >> ${monthly_backup_script}
|
102
|
99
|
echo "# Backup ${database_name}" >> ${monthly_backup_script}
|
103
|
100
|
echo "if [ -f /var/backups/${database_name}_monthly.sql ]; then" >> ${monthly_backup_script}
|
104
|
101
|
echo " cp -f /var/backups/${database_name}_monthly.sql /var/backups/${database_name}_2monthly.sql" >> ${monthly_backup_script}
|