Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (10 sloc) 0.594 kb
(use srfi-19 posix)
(change-directory "~/db")
(let ((name (string-append "ktr-db-backup-" (date->string (current-date) "~m~d~y-~H~M-~S") (if (file-exists? "~/keep-the-records/i-am-staging") "-staging" ""))))
(process-wait (process-run (string-append "cp ~/db/ktr-db-auto-backup ~/db/" name)))
(print "backing up " name)
(process-wait (process-run (string-append "/usr/local/bin/tarsnap -c -f " name " " name)))
(with-output-to-file "last-backup" (lambda () (write name)))
(print "done backing up")
(print "cleaning up")
(process-wait (process-run (string-append "rm " name))))
Jump to Line
Something went wrong with that request. Please try again.