Backing up my laptop

To my surprise, my laptop has become my primary computer. With my old Fujitsu and my Macbook, I still made a remote connection to my desktop and worked there. However, with my Thinkpad, I have finally found a laptop that I am happy with, I think it is down to the quality of the keyboard. Working locally means I need to back the system up.

I have to admit that I put it off back-ups as I was waiting to find the time to learn a specialised backup program, which I still will learn soon. This week I decided that in the meantime, I will backup to an external drive that I had lying around.

I started by creating a new encrypted partition on the external device:

sudo cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/sdb1

Read my recent series on encryption for more details on that.

Then I unlocked the partition:

sudo cryptsetup luksOpen /dev/sdb1 backup

Then I created a filesystem:

sudo mkfs.reiserfs /dev/mapper/backup

The next step was mounting the filesystem somewhere:

mount /dev/mapper/backup backup-disk

Then I headed over to the mountpoint:

cd backup-disk

Lastly, I copied my home directory here:

rsync -avzt /home/user ./

I saved a script that has some of the above commands (skip lines 1 and 3), rsync will only copy the changes, making the process very quick.

Discuss this post | Leave a comment

2 thoughts on “Backing up my laptop

  1. <p>Nice to see some writing again! I was beginning to think you'd dun run off
    with that cute mid-eastern girl. <img src="/static/forum/img/smilies/wink.png"></p>
    <p>I've always used tar for backup but after looking at your line, I discovered
    that rsync compresses too! Also I learned that rsync includes --exclude=
    just like tar and putting in --delete removes the destination file if has
    been removed from source. Who know I possibly will start using it.</p>

  2. <p>Hmmm ... I have been rsync for a long time just to do back ups, but be aware that if you put the --delete option, and have a nice cron to do your backup, and you actually do a:
    rm -rf /home/kewlmyst/important_stuff/
    and your little cron does it's job ... you have also lost your 'important stuff' on the backup.
    &#64;dirk: the -z option compresses the network flow, but not the actual data strored on the remote location/disk.</p>

How about Global Thermonuclear War? Wouldn't you prefer a good game of chess? Powered by zpress