Hourly Snapshot Style Backup

From BubbaWiki
Revision as of 13:43, 14 March 2011 by A1n (talk | contribs) (Created page with '= General = On a B3 the scripts in this Howto create an hourly backup (snapshot) of the data directories on the server for all the users on the system and for the storage direc...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General

On a B3 the scripts in this Howto create an hourly backup (snapshot) of the data directories on the server for all the users on the system and for the storage directory. The backup is on an external (esata) disk.

These scripts create what appears to the user a full backup every hour, when in fact you only get an image of what is unchanged plus the changes since the last backup. The result is an incremental backup which is very fast typically a few minutes, and the total backup volume of around 30 backups is not much bigger than just one backup. The backup is accessible by all users so that they can get there missing files themselves. The backup is only accessible as a read only file system, so that the users cannot mess up the backups. On the backup all the permissions from the original files are maintained so that if a user has something private in his directories, other users cannot access it through the backup.

This is what you see in the snapshot directory:

louis@b3:/home/storage/snapshot$ ls -l
total 140
drwxr-xr-x 9 root root 4096 Mar 9 00:00 00
drwxr-xr-x 9 root root 4096 Mar 9 01:00 01
drwxr-xr-x 9 root root 4096 Mar 9 02:00 02
drwxr-xr-x 9 root root 4096 Mar 9 03:00 03
drwxr-xr-x 9 root root 4096 Mar 9 04:00 04
drwxr-xr-x 9 root root 4096 Mar 9 05:00 05
drwxr-xr-x 9 root root 4096 Mar 9 06:00 06
drwxr-xr-x 9 root root 4096 Mar 9 07:00 07
drwxr-xr-x 9 root root 4096 Mar 9 08:00 08
drwxr-xr-x 9 root root 4096 Mar 9 09:00 09
drwxr-xr-x 9 root root 4096 Mar 9 10:34 10
drwxr-xr-x 9 root root 4096 Mar 9 11:00 11
drwxr-xr-x 9 root root 4096 Mar 9 12:00 12
drwxr-xr-x 9 root root 4096 Mar 9 13:00 13
drwxr-xr-x 9 root root 4096 Mar 8 14:00 14
drwxr-xr-x 9 root root 4096 Mar 8 15:00 15
drwxr-xr-x 9 root root 4096 Mar 8 16:00 16
drwxr-xr-x 9 root root 4096 Mar 8 17:00 17
drwxr-xr-x 9 root root 4096 Mar 8 18:00 18
drwxr-xr-x 9 root root 4096 Mar 8 19:00 19
drwxr-xr-x 9 root root 4096 Mar 8 20:00 20
drwxr-xr-x 9 root root 4096 Mar 8 21:00 21
drwxr-xr-x 9 root root 4096 Mar 8 22:00 22
drwxr-xr-x 9 root root 4096 Mar 8 23:00 23
drwxr-xr-x 9 root root 4096 Mar 8 00:00 dinsdag
drwxr-xr-x 7 root root 4096 Mar 3 00:00 donderdag
drwxr-xr-x 9 root root 4096 Mar 7 00:00 maandag
drwxr-xr-x 9 root root 4096 Mar 4 00:00 vrijdag
drwxr-xr-x 7 root root 4096 Mar 2 00:00 woensdag
drwxr-xr-x 9 root root 4096 Mar 5 00:00 zaterdag
drwxr-xr-x 9 root root 4096 Mar 6 00:00 zondag


Each directory containing a full image of your directories at the time of the backup. The funny names are the days of the week in Dutch, the scripts in this post will yield the names in English.

Hope it is useful to you.

\a1n