backup
Daryl Styrk
darylstyrk at gmail.com
Tue Jul 7 14:01:04 UTC 2009
On Mon, Jul 06, 2009 at 09:07:02PM -0700, NoOp wrote:
> > Do this. Make two new dirs..
> >
> > $ mkdir source ; mkdir dest
> > $ cd source
> > $ touch file1 file2 file3 file4; ls
> > $ mkdir included; cd included
> > $ touch filea fileb filec filed; ls
> > $ cd; ls
> >
> >
> > Now you have 2 directories that contain 4 files each. Back them up to the
> > directory dest/
>
> Why not just use an existing folder. But OK.
Because we are making something we can trash over and over again. If they
are here asking about backups obviously smoking /home, /Music or
/Wedding_Photos while we learn might make for a bad week.
> > rsync -avh source/ dest/source/
> >
> > sending incremental file list
> > created directory dest/source
> > ./
> > file1
> > file2
> > file3
> > file4
> > included/
> > included/filea
> > included/fileb
> > included/filec
> > included/filed
> >
> > sent 467 bytes received 171 bytes 1.28K bytes/sec
> > total size is 0 speedup is 0.00
>
> So now we've managed to basically use rsync to copy files between two
> folders on the same hard drive; from 'source' to 'dest'. Such actions
> can be accomplished easier via Nautilus using drag & drop, and could be
> expanded to the new USB hard drive as well.
>
> Sorry, but IMO your example provides no useful information on how to
> actually perform a full system backup to an external drive.
>
rsync is a superior cp command. In linux everything is a file. Including
your CD/DVD drive, all hard drives, the kernel, everything. Modify your /dest
as you see fit. Be it /dev/null /dev/sda1 /media/disk /mnt/MYBOOK .
You pick, linux does not care. Its a file.
You can drag and drop if you'd like, but it doesn't make much sense to
copy the same files over and over and over again. I have 60G of music.
Why copy all 60G everyday when I might only add one album or a single
track? Even a worse idea when you start to move stuff across the network.
Make some big files and see how it works..
dd if=/dev/urandom of=$HOME/BIG_1 bs=1M count=300
No, my example does not provide a full system backup for anyone. My example
wasn't even intended to start assembling a backup. My example was, make
some files, find a tool, and use the tool with some junk files to see how
things work. Come ask questions when you get stuck.
cp -r / /media/disk? # asking for problems... loop.
rsync -avh --exclude /media / /media/disk # why get /proc, or /tmp?
Too many more to go into, but thats what the man pages are for along with
good old google. So now that you know about the tools, go ahead and play
with them. There is no single backup solution for everyone. So look at
your options, decide on what you need and what you want to do and start
pulling something together.
Might make more sense to use rdiff-backup instead of rsync on /home/Documents.
rsync is probably a better tool to move music. dd might be better to
clone /etc or /home for a reinstall. Don't really know. All depends.
--
Daryl Styrk
Naples FL, USA
More information about the ubuntu-users
mailing list