Author Topic: Whole Disk Backup ?  (Read 9800 times)

ins0mniaque

  • Newbie
  • *
  • Posts: 27
    • View Profile
Whole Disk Backup ?
« on: February 07, 2006, 03:15:18 pm »
Hi. I'm quite an OpenBSD newbie, and I keep on trying a whole lot of things and switch forth and back from pdaXrom, Cacko and OpenBSD.

Right now I'm using my C3000 only to play music / C++ coding / wardriving. OpenBSD does those things quite well, and being able to SSH into my zaurus to change the currently playing song is quite fun

But I'm starting to mess with the kernel, building the patches iamasmith provided to fix the X event buffer bug, and I would like to "revert" the zaurus to a previous backup, the fastest way possible. I am not using any form of backup right now. I've looked at amanda, rsync, or just "tar"ing the whole disk. What would be perfect would be a background backup to a remote samba directory executed between certain hours when the zaurus is idle.

What are you using to backup / restore your precious little machine ?

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Whole Disk Backup ?
« Reply #1 on: February 08, 2006, 07:26:42 am »
Quote
Hi. I'm quite an OpenBSD newbie, and I keep on trying a whole lot of things and switch forth and back from pdaXrom, Cacko and OpenBSD.

Right now I'm using my C3000 only to play music / C++ coding / wardriving. OpenBSD does those things quite well, and being able to SSH into my zaurus to change the currently playing song is quite fun

But I'm starting to mess with the kernel, building the patches iamasmith provided to fix the X event buffer bug, and I would like to "revert" the zaurus to a previous backup, the fastest way possible. I am not using any form of backup right now. I've looked at amanda, rsync, or just "tar"ing the whole disk. What would be perfect would be a background backup to a remote samba directory executed between certain hours when the zaurus is idle.

What are you using to backup / restore your precious little machine ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114006\"][{POST_SNAPBACK}][/a][/div]

Since the Kernel is monolithic you don't need to worry about kernel modules, backing them up etc.

When you build a kernel it produces a file called bsd which you can boot... when testing I typically copy it to /bsd.test and when the boot prompt comes up I type in bsd.test leaving my old Kernel in place until I am sure I haven't broken anything.

For backups you may want to look at rsync or if you want a nice way to sync text changes back and forth consider unison.

If using rsync for backup check the option list.. you certainly want to make sure you have the -a (archive flag) and probably want to use the z flag for compression. rsync will 'just find' ssh and use if it you do something like..

rsync -avz myzaurusname:/home/myname ./mybackup

Now be careful about a couple of things... if you want to sync data then rsync is good, if you want to backup a snapshot you need to be very careful... firstly you need to be root to preserve uid/gid, secondly rsync is clever and if you have a user called fred on your local system and a user called fred on the remote with different uids then rsync will map fred to fred and change the uid on the files if copies.. true snapshots can be accomplished as follows..

rsync -avz --numeric-ids myzaurusname:/ ./myZaurusBackupDir

you may wish change your mind about using the -z option if you have a lot of large already compressed files since it can waste a lot of time.

I run moinmoin as a PIM Wiki and I use unison to sync the wiki data between a Gentoo box and my Zaurus running OpenBSD so I can edit the wiki on either and then sync it back. unison has a rather neat feature of being able to sync conflicts using diff/patch

- Andy
« Last Edit: February 08, 2006, 09:15:52 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Whole Disk Backup ?
« Reply #2 on: February 08, 2006, 07:28:07 am »
Incidentally the ws mouse patch is now in the -current cvs so expect the next Zaurus snapshot to contain that patch.
« Last Edit: February 08, 2006, 07:28:21 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

ins0mniaque

  • Newbie
  • *
  • Posts: 27
    • View Profile
Whole Disk Backup ?
« Reply #3 on: February 08, 2006, 02:34:58 pm »
Thank you very much. I'll use rsync for my snapshots and unison to keep my "PIM data" (which is vim + text files) synchronized.

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Whole Disk Backup ?
« Reply #4 on: February 14, 2006, 07:32:09 pm »
Actually, a little more info on rsync... to cut out errors on /dev (I'm assuming you would probably reinstall before restoring files) and to make sure that the rsync deletes files that no longer exist on the zaurus from the backup you may want to use something like I do... (mungo is the name of my zaurus).

backupmungo.sh

#!/bin/sh
cd /home/andrews/archive/mungo-rsync
rsync -avz --numeric-ids --delete --exclude '/dev/*' mungo:/ .

Note that rsync gets its performance by sending only changes so it rocks for taking safe snapshots... obviously if you want date by date archives then you should probably copy these snapshot directories between rsync operations.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Whole Disk Backup ?
« Reply #5 on: May 08, 2007, 03:01:00 pm »
hi
now i've a quite good version of openbsd running on my zaurus, i'm thinking about a backup solution !
this thread talks mainly about synchronization solutions, but not a way of backing up the whole openbsd filesystem to restore it further (after testing another distro for example
what is the best way to do that with openbsd zaurus ???
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Whole Disk Backup ?
« Reply #6 on: June 27, 2007, 08:15:42 am »
well,
i just backuped my openbsd system with a tar zcvpf backup.tgz /
i hope i'll be able to restore it later after i spend my holidays with pdaxii13

do you think a stock restore will work after the initial openbsd partitionning scheme ?
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun