]> dev.renevier.net Git - syj.git/commitdiff
crontab: database backup
authorarno <arno@renevier.net>
Mon, 29 Nov 2010 12:20:21 +0000 (13:20 +0100)
committerarno <arno@renevier.net>
Mon, 29 Nov 2010 12:20:21 +0000 (13:20 +0100)
scripts/crontab.syj

index 0513a3055ed32739c440b27c101d24bc72d29f51..cf80bef8bc5f9279d621b420049264a8d229e65e 100644 (file)
@@ -11,3 +11,5 @@ MAILTO=arno@renevier.net
 48 4 * * * psql syj syj -c "VACUUM ANALYZE pending_actions" > /dev/null
 # every day, clear lighttpd compress cache
 12 5 * * * find /data/work/syj/lighttpd/lighttpd-cache -type f -mtime +2 | xargs -r rm
+# every day, database backup
+12 16 * * * pg_dump -t paths -t paths_id_seq -t pending_actions -t pending_actions_id_seq -t users -t users_id_seq  | gzip > /data/project/syj/backups/db_$(date +'\%Y-\%m-\%d').gz