From: arno Date: Mon, 29 Nov 2010 12:20:21 +0000 (+0100) Subject: crontab: database backup X-Git-Tag: v0.3~30 X-Git-Url: https://dev.renevier.net/?a=commitdiff_plain;ds=sidebyside;h=bfe63b61894a100bd3d83ac86593a8d767b94920;hp=48e5c41e67c16b83245f7ada893e92f11205a267;p=syj.git crontab: database backup --- diff --git a/scripts/crontab.syj b/scripts/crontab.syj index 0513a30..cf80bef 100644 --- a/scripts/crontab.syj +++ b/scripts/crontab.syj @@ -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