[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Re: Backup advice
Richard Ibbotson wrote:
Alex
The advice you gave me about using a DVD recorder in place of a CD
recorder worked out well. I changed the script to this to make it
work.......
rsync -a /home/mydocuments/ /home/mybackup/ > /dev/null 2>&1
mkdir -p /tmp/backup
export FILE=backup-`date +%Y%m%d`.tgz
tar -cz /home/mybackup > /tmp/backup/$FILE
mkisofs -r -J -o /tmp/backup.iso /tmp/backup
dvdrecord -v speed=2 dev=0,1,0 -data /tmp/backup.iso
rm -rf /tmp/backup /tmp/backup.iso
Ran it as 'backup' and it dropped several hundreds of MBs of data onto
a DVD disk in seconds. I'm now trying to work out how to use it with
several directories. Such as .... /home/user1/ /home/user2/
/home/user3. How do I add this in to the above script to make a
tape archive of data from several different directories.
You can read in the directories for tar from standard input. So you
could do something like:
ls <WHATEVER PATTERN> > .file
tar -cz `cat .file`
Obviously you could also put the ls into the backquotes. I tend to put
them in a file so I can email myself a list with no risk of that
changing between two runs of ls.
- J
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.