Some snappy explanation.
- Use URIs to identify things
- Use HTTP URIs so that people can locate and look up these things
- Provide useful information about the thing when it's looked up
- Include links to other, related things in the exposed data as a means of improving information discovery on the Web
Machine Admin – Ubuntu, dead HD, EeePC space, USB stick backups etc.
Some recent experiences that someone else might find handy.
A big tip to start with – whatever your hardware, get yourself a reasonably sized USB stick (say 2GB+) and create a live-bootable Ubuntu image on it (making 2 partitions seems a good idea – one for live Ubuntu and the rest for moving files around). On the Ubuntu (8.10) menus there’s System – Administration – Create Startup Disk.
Main Laptop
When I got back from my European fugue, the HD on my main machine (Dell Latitude D820) was broken, I could only boot to recovery on an old kernel. Bit annoying as I’d only taken the EeePC 900 travelling, and to my knowledge the Dell hadn’t had any bumps. No joy with fsck, on boot the auto-checking/repair was running for more than 48 hrs before I gave up.
I’d left a few GB free space on the Dell so attempted to make that the new boot partition & reinstall Ubuntu there. I don’t know whether it was due to the drive damage or as bug in gparted, but in creating the new partition it lost the table of existing partitions. A bit of googling suggested this is probably recoverable, but my priority was just to get a working machine again (I think all that’s not backed up elsewhere on that drive is a bunch of notes and a handful of photos). So I bought a new HD – I think it was 65 euro for 120GB. It was easy to replace, and (using Ubuntu-on-a-stick) getting a basic install back up was really quick. Downloading and installing the apps I use a lot took a lot longer.
But as it turned out, my core apps plus a handful of trivia only came to about 12GB, so I bought a 16GB USB stick (about 40 euro I think), formatted it to one big ext3 partition and used rsync (as root) to copy everything from the newly populated HD onto it.
Here’s what I’m using on the Dell (in /home/danny):
backup.sh
rsync -avh --delete --exclude-from '/home/danny/rsync_exclude.txt' / /media/DellBackup/
The stick I named DellBackup, the script needs chmod 777 backup.sh (or similar) and I run it as root.
also:
rsync_exclude.txt
/home/danny/Desktop/downloads /media /dev /var/run /var/lockwin /var/log /var/spool /var/backups /tmp /home/danny/Desktop/torrents
It’s no doubt well suboptimal, but seems to work ok.
EeePC
Ok, my first issue was buying the WinXP model, which I believe has smaller drives. Not sure if this was another mistake but I put the / mount on sda1 (the whole of the 4GB flash drive) and /home on sdb5 the whole of the 8GB flash drive – dunno why it went for ’5′).
Yesterday I discovered I’d filled the sda1 partition, though there was a fair bit of space left on sdb5. While the blog post Moving /usr to another partition is very handy, it doesn’t help much when there isn’t unassigned space or a free partition. Fortunately it turns out that if you boot from an external drive (remember that Ubuntu Live stick?) it’s possible to resize & create partitions on the internal drives. So after ensuring I had backups of /usr and /home (see below) I resized the sdb5 (/home) partion and created another in the free space, which I mounted temporarily, copied the whole of /usr onto it (as root, cp -dpR /usr/* /usr_new/) and then edited /etc/fstab to add the following:
/dev/sdb6 /usr auto defaults,errors=remount-ro 0 1
btw, although I’ve yet to do all the EeePC optimizations that Google can suggest, these bits (in fstab) seemed a good idea:
tmpfs /var/log tmpfs defaults 0 0 tmpfs /tmp tmpfs defaults 0 0 tmpfs /var/tmp tmpfs defaults 0 0
So they all get wiped on reboot.
Anyhow, backup-wise on the EeePC I did the same USB backup trick as above, the scripts this time being:
backup.sh
rsync -avh --delete --exclude-from '/home/danny/rsync_exclude.txt' / /media/eeepcbackup/
rsync_exclude.txt
/home/danny/Desktop/downloads /media /dev /var/run /var/lock /var/log /var/spool /var/backups /tmp /proc # add /sys ?
Additionally, the EeePC has a flash card socket that wasn’t really doing much, so I thought I might as well use that as well. So I bought a 4GB card and again formatted it to ext3, labeling it eeepchome . Another script:
backup-home.sh
rsync -avh --delete /home /media/eeepchome/ rsync -avh --delete /etc /media/eeepchome/
The card is mounted by default, so I think I’ll add that as a daily cron job.
Incidentally, the backup setup I aim for is (at least) two local copies of everything, plus one remote. I use svn for code, so that’s sorted (I have copies on both these laptops). Some time soon I’ll set up rysnc to my remote server for the laptops, more or less as above.
I’ve not had much luck with external USB HDs, the USB circuit on my first one broke not long after I bought it, so I pulled out the drive and stuck it into Caro’s machine. The one I’ve got now has a flaky interface, it’ll often drop the connection/not be recognised.
I’ve backed up most of the work-in-progress from my music workstation (currently Frankenstein WinXP desktop) onto that external drive, but once I’ve archived (and/or published) the user data from Caro’s (Frankenstein WinXP) desktop I’ll stack that up with big HDs (probably with RAID – is it 5 that’s the safest?) and use that as the home file/print server.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
