=== modified file 'resources/cron/pg_backup.sh' --- resources/cron/pg_backup.sh 2011-06-13 12:02:17 +0000 +++ resources/cron/pg_backup.sh 2011-06-13 21:19:39 +0000 @@ -1,10 +1,5 @@ #!/bin/sh -# The backupdir must be created manually (mkdir pg_backups) -# The backupdir owner must be changed to postgres (chown postgres pg_backups) -# Script must be made executable (chmod 755 pg_backup.sh) -# Script must be invoked by postgres user - backup_dir="/var/backups/pg_backups" datetime=`date +%F` backupfile="$backup_dir/pg-backup-$datetime.gz" === added file 'resources/cron/readme.txt' --- resources/cron/readme.txt 1970-01-01 00:00:00 +0000 +++ resources/cron/readme.txt 2011-06-13 21:19:39 +0000 @@ -0,0 +1,17 @@ + +This is a simple cron job set up for backing up PostgreSQL databases to local disk. + +It consists of two files: + +1) pg_backup.sh - backup script doing the actual work + +- The backupdir must be created manually (mkdir pg_backups) +- The backupdir owner must be changed to postgres (chown postgres pg_backups) +- Script must be made executable (chmod 755 pg_backup.sh) +- Script must be invoked by postgres user + +2) pg_backup.cron - crontab file invoking the script every day at 23:00 + +- Crontab can be loaded with crontab command: crontab pg_backup.cron +- Active cron jobs can viewed with: crontab -l +- Cron jobs can be terminated with: crontab -r