[KLUG Members] linux/windows backup options

bill bill at billtron.com
Mon Oct 25 11:36:47 EDT 2004


On Sun, 2004-10-24 at 00:19, Richard Harding wrote:
> I am looking at setting up a backup server at home. I just want to toss 
> in a 200gb disk and backup /home and my documents folders from debian 
> and Windows XP machines. 


To backup Win machines, I use something like this:

smbtar -s $WORKSTATION -x $VOLUME -u $CONTEXT -p $SECRET -t $FILENAME

which means

smbtar -s server [ -p password ]  [ -x services ] [ -d  direc-
       tory  ]   [ -u user ]  [ -t tape ]

If you give the -t option a filename it will save it to a file instead
of a tape.

I then use 

tar -tf $FILENAME > $FILELIST

It confirms that the tar file was not corrupt and I can use the file
list later when doing a restore.

I then compress the tar file.

gzip $FILEDIR/$FILENAME

and keep three weeks of backups in three directories:

mv -f $BACKUPROOT/$WK2DIR/$FILENAME.gz $BACKUPROOT/$WK3DIR/$FILENAME.gz
mv -f $BACKUPROOT/$WK2DIR/$LISTNAME $BACKUPROOT/$WK3DIR/$LISTNAME
mv -f $BACKUPROOT/$WK1DIR/$FILENAME.gz $BACKUPROOT/$WK2DIR/$FILENAME.gz
mv -f $BACKUPROOT/$WK1DIR/$LISTNAME $BACKUPROOT/$WK2DIR/$LISTNAME      
mv -f $BACKUPROOT/$FILENAME.gz $BACKUPROOT/$WK1DIR/$FILENAME.gz
mv -f $BACKUPROOT/$LISTNAME $BACKUPROOT/$WK1DIR/$LISTNAME


All the words beginning with "$" are variables, of course.  You would
set them to whatever you want at the beginning of the script, or replace
them with actual values if you're typing from the command line.

kind regards,

bill



More information about the Members mailing list