There are two types of backups that I do. The first is a backup of
several key folders, not my entire system. This is in case I blow
something away, or lose some data that I’d want to get back quickly.
I use the rsync command for this. Rsync is a simple and
fast way to make an exact copy of something. That something can be a
single file or a whole file system.
Now my external hard drive is a firewire drive, which Ubuntu
thoughfully mounts in /media for me with the wonderful name of
‘ieee1394disk’. That’s where I want to keep this backup copy. Let’s
open up a terminal session and go backup some stuff.
Now I’m in my external drive. If you have a USB disk, chances are it’s under /media/usbdisk or /media/whatevertheheckyoucalledit. I’m going to make a folder to store this backup in because I’m something of a filesystem neat freak.
Now there are four directories that I back up on a regular basis. These are my /home directory, my /etc directory my /opt directory and my mp3 collection.
My mp3’s are located on a FAT32 partition mounted in /media/sda5 in a
folder called music. So here’s the command I use to copy all of these.
rsync -arvu /home /etc /opt /media/sda5/music .
Here’s what the switches after the rsync command mean. a= archive, r= recursive, v= verbose, u= update and z= compress.
What I like about this is that while the first rsync does take some
time to copy all of these files and folders the first time it’s run,
the next time it’s run it only adds new stuff. So if I run this once a
week and the only changes that were made was that I added several new
mp3s to my music directory, it will only copy those new files.
If I accidentally deleted an mp3 that I wanted, I could easily (and
through the GUI) go to my external drive and copy it back. Or if I
accidentally deleted my /home directory (yikes!) I could rsync it back
by reversing the command:
rsync -arvu /media/iee*/arsgeek_backup/home .
- June 2007 (1)
- May 2007 (21)
- April 2007 (32)
- March 2007 (42)
- February 2007 (15)
- January 2007 (24)
- December 2006 (41)
- November 2006 (94)
- October 2006 (71)
- September 2006 (33)
- August 2006 (41)
- July 2006 (26)
- June 2006 (24)
- May 2006 (18)
- April 2006 (6)
- March 2006 (29)
- February 2006 (28)
- December 2001 (1)