Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Contributions to ELOG  Not logged in ELOG logo
Message ID: 38     Entry time: Fri Sep 9 12:08:26 2011
Author: Andreas Luedeke 
Author Email: andreas.luedeke@psi.ch 
Category: Script 
Subject: create incremental daily backups of logbooks for Unix/Linux 
Status: Beta 
Last Revision:  
A very simple backup utility for elog logbooks.
If you want to recover your logbook from corrupted entries, an incremental backup comes in handy:
you can just replace the corrupted files with the previous versions.
Below is a very simple wrapper to create backups of the logbook into some local directory (/logbooks_backup in
the example script). The second wrapper lists the files in a given ".tar" archive.

You would run the backup from a cron job with the line:
1 0 * * * /usr/local/elog/elog_backup_daily

This will create daily backups of modified logbook and config files and a weekly backup of the password file
/usr/local/elog/passwd.txt (if you wonder why: our passwd.txt file has more than 1 MByte and of course it
changes with every login).

elog_backup_daily (copy to /usr/local/elog) script to create tar file and remove tar files older than 90 days
exclude-logbooks  (copy to /usr/local/elog) list of files to be excluded in backup (thumbnails, etc.) 
elog_backup_listfiles (copy to /usr/local/bin) shows content of a given tar file (omits directories in list)
Attachment 1: elog_backup_daily  744 Bytes  | Show | Show all
Attachment 2: exclude-logbooks  123 Bytes  | Show | Show all
Attachment 3: elog_backup_listfiles  27 Bytes  | Show | Show all
ELOG V3.1.5-2eba886