Thursday, 5 April 2007

Notes on Backing stuff up...

So I don't forget:

To backup the (or a) svn repository to the user home directory:

python --archive-type=gz /path/to/svn/repository ~/

To backup the trac instance and pipe the hotcopy output to a gzipped file:

trac-admin /path/to/trac/instance hotcopy ~/my-trac-backup-folder | tar cvpzf ~/tracbackup.tgz

Also note for tar (and if working from a different folder) that the syntax runs like this:

tar cvzf /path/to/compressed-filename.tgz /path/of/folder-to-be-archived/

This will 'tar up' all the files within that particular folder (and subfolders).

And for the overly cautious - to backup *everything* from the root folder into one huuuuuge gzipped file:

tar cvpzf ~/my-filesystem-backup-file.tgz / –exclude=/name/of/folder/to/be/excluded

No comments: