Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Backup strategy



In response to recent comments to Joe, I though I would suggest a bare bones simple backup strategy that I have been following using nothing but the below two tar commands (which I have in my ~/bin directory). For personal use to back up ones own data, it seems to me quite adequate and can hardly be simpler, always a virture, I think.

Once in a great while I make a CD of all my user data, and once a week back up everything that has changed since then to my flash memory card in the pci slot. (excluding the Trash dir of KDE and other things useless files with the --exclude's)

So every Monday I run "backall todays.date"

#!/bin/bash
tar czvf "/flash/$1" --newer-mtime=2005/03/09 --exclude='*.Trash*' \
--exclude='/xp/archive*'  --exclude='*~' --exclude='*#'  /xp


Then every day I run the below which backs up (in a second or two) everything changed since Monday: "daily tues" changing the argument to whatever day of the week it is. This avoids having a pile of old daily backups since it just overwrites last week's.

#!/bin/bash
echo "backing up to filename /flash/$1"
tar czf /flash/$1 -N 'last mon' --exclude='*.Trash*' --exclude='*#' \
--exclude='/xp/archive.unchanging.data/*' --exclude='*~'  /xp

Many things could of course be done to grab the date automatically and all, but I kind of like forcing myself to think for half a second.

David Riggs,
Kyoto


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links