← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3891: Cron readme

 

------------------------------------------------------------
revno: 3891
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-06-13 23:19:39 +0200
message:
  Cron readme
added:
  resources/cron/readme.txt
modified:
  resources/cron/pg_backup.sh


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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