Restore files from obnam

Well, well, well… Seems I just fucked up:

  1.  I should have remembered that tc can only control outoging traffic. So changing /etc/network-scripts/tc.sh for incoming rates was just stupid.
  2. I wrote the file to disk without keeping the original, working lines commented out.
  3. I didn’t remember the proper bandwidth values.

Fortunately, I keep an obnam-backup. To recover files from e.g. /etc, do the following:

# mount /dev/mapper/obnam-c /mnt/backup-obnam/
# obnam restore --to=/tmp/restore\
 --config=/home/am/.config/obnam/etc.conf

That restores all of /etc to /tmp/restore. Add a file or directory the end to only restore that file or directory, or leave out –to to restore in place.

Do not forget to umount /mnt/backup-obnam afterwards!

Another thing: If obnam complains about locking errors, do the following:

# mount /dev/mapper/obnam-c /mnt/backup-obnam/
# cd .config/obnam
# for i in *.conf ; do obnam force-lock --config $i ; echo $i ; done

Shit gebeurt 🙁