Author Topic: Backup Hints?  (Read 2846 times)

LadyBug

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • http://
Backup Hints?
« on: January 24, 2005, 11:55:42 am »
Last Friday I finally took the plunge and switched from Cacko to pdaXrom. So far I have  pretty much transferred everything I needed, although going from SafeDee to portabase was painful.

Anyway, my main concern now is backup. I'm planning to use unison, but I'd like some input on what folders I should be backuping. /home/root, sure, but it contains only a minor part of the actual tweaked system. Then again, I really am not planning to dump the whole /, since a new ROM version would render that pretty much unusable.

Hints, anyone?
C760, Symbol CF WiFi, Lexar 1GB SD, score of CFs
Currently running pdaXrom.

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Backup Hints?
« Reply #1 on: January 24, 2005, 01:19:02 pm »
/etc is traditonally where the system-wide configuration files resides.

So this is probably what you want to save.
SLC-860 cacko / senao wifi

totaln00b

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Backup Hints?
« Reply #2 on: January 24, 2005, 03:29:32 pm »
Hi,

I saw this post and was greatly relieved because I've been looking for something sensible (idiot-proof) for backing up my zaurus (rc5) for ages. Is there a pdaxrom version of unison available? I can only find one for sharp-roms, or will that work?

Thanks

Jo
CL 860, cacko  1.23 full, Sandisk 512Mb CF, Kodak 256Mb SD, Symbol Spectrum24 wifi
SL 5500, standard rom, 256Mb SD, CF GPS

Laze

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • http://www.pdaXrom.org
Backup Hints?
« Reply #3 on: January 24, 2005, 04:10:21 pm »
Of course a backup of /home/root (if your running as root - like most people are) - would make all settings and gaim settings etc. stored.
C760 running pdaXrom lastest ;-)
SL5500 Running Cacko Qtopia
512 MB SD Card, 128 MB CF Card, Prism2 CF Wlan.

Always visit http://www.pdaXrom.org for latest news.

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Backup Hints?
« Reply #4 on: January 26, 2005, 02:06:47 am »
I haven't used unison before but I use rsync-over-ssh as its fast and perfect for one-way backups.  You can download it from my unstable feed.

You might want to check out an rsync wrapper like Dirvish or Becky.  I will probably use one of those eventually (since they make complete snapshots, using hardlinks, everytime you backup) but for now I backup my whole Zaurus (excluding applications) using a simple rsync wrapper I wrote.

My backup system consists of two shell scripts, two rsync exclude files and an include file.  Every time I want to backup I just type mybackup in a terminal window and any new files are transferred to my Linux desktop PC using rsync over ssh.  I also use an option on rsync to have it store a backup copy of any file that is replaced.

I store any scripts I write in /usr/local/bin and unfortunately since a lot of ipks install files to the /usr/local tree I've had to create a script that creates an exclude file so that rsync will ignore any files installed by an ipk.  I also sometimes modify files in /usr/share/applications and /usr/share/pixmaps so this script also allows me to specifically include these files.

Here is the source for my scripts and exclude/include files:

/usr/local/bin/mybackup
Code: [Select]
#!/bin/sh
#
# Zaurus backup script
#

OPTS="$* --archive --delete --delete-excluded --rsh=ssh --progress --backup --backup-dir=.rsync-backup --include-from=/mnt/card/backups/mybackup.include --exclude-from=/mnt/card/backups/mybackup.exclude --exclude-from=/mnt/card/backups/mybackup.ipkg.exclude"
SRCS="/etc /home /mnt /usr"
DEST="root@my.desktop.pc:/root/backup/zaurus"

echo -n "Updating exclude list... "
if update-mybackup-excludes; then
        echo "done."
        rsync $OPTS $SRCS $DEST
fi

/usr/local/bin/update-mybackup-excludes
Code: [Select]
#!/bin/sh

TARGET=/mnt/card/backups/mybackup.ipkg.exclude

ME="
$(basename $0)"

if [ ! -w "$TARGET" ]; then
        echo "$ME: file not writable: '$TARGET'"
        exit 1
fi

OUTFILE=$(mktemp /tmp/update-mybackup-excludes.$$.tmp.XXXXXXX)
if [ -z "$OUTFILE" ]; then
        echo "$ME: could not create temporary file"
        exit 2
fi
if [ ! -w "$OUTFILE" ]; then
        echo "$ME: file not writable: '$OUTFILE'"
        exit 3
fi

grep -h "/usr/local" /usr/lib/ipkg/info/* | grep /$ | grep -v -e "local/$" -e "bin/$" -e "share/$" -e "share/applications/$" -e "share/pixmaps/$" > "$OUTFILE"

grep -h "/usr/local" /usr/lib/ipkg/info/* | grep -v "/$" | grep -e "bin/[^/]" -e "share/applications/[^/]" -e "share/pixmaps/[^/]" | sed 's/\[/\\\[/' >> "$OUTFILE"

if cmp -s "$OUTFILE" "$TARGET"; then
        rm $OUTFILE
else
        mv "$OUTFILE" "$TARGET"
fi

/mnt/card/backups/mybackup.exclude
Code: [Select]
/mnt/card/backups/*
/mnt/card/Documents/Music/*
/mnt/card/Documents/Video/*
/mnt/card/Documents/Web/sitescooper/txt
/mnt/card/Documents/sync/*
/mnt/cf
/mnt/fat/initrd.bin
/mnt/fat/tools.tar
/mnt/fat/updater.sh
/mnt/ide
/mnt/net
/mnt/user
/usr/*
/usr/lib/*
/usr/lib/ipkg/*
/usr/share/*
/usr/share/pixmaps/*

/mnt/card/backups/mybackup.include
Code: [Select]
/mnt/card/backups/*.tar.gz
/mnt/card/backups/*clude
/usr/etc
/usr/lib
/usr/lib/ipkg
/usr/lib/ipkg/status
/usr/local
/usr/local/share/applications/dopewars.desktop
/usr/local/share/applications/kanatest.desktop
/usr/local/share/applications/leafpad.desktop
/usr/local/share/pixmaps/dopewars-pill.png
/usr/share
/usr/share/pixmaps
/usr/share/pixmaps/dopewars-pill.png
/usr/share/pixmaps/kanatest.png
/usr/share/pixmaps/leafpad.png

This works well for me but YMMV.
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults

totaln00b

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Backup Hints?
« Reply #5 on: January 26, 2005, 06:49:14 am »
rgrep,

your solution seems to be linux-linux, is that correct? I liked the idea of unison as it can do windows to linux and vice versa. Can nobody tell me where to get a pdaXrom version from, or whether the qtopia one will work?

Thanks

Jo
CL 860, cacko  1.23 full, Sandisk 512Mb CF, Kodak 256Mb SD, Symbol Spectrum24 wifi
SL 5500, standard rom, 256Mb SD, CF GPS

totaln00b

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Backup Hints?
« Reply #6 on: January 27, 2005, 09:21:55 am »
OK, sorry, thought I'd searched quite thoroughly about this, but no!

So for other people who might not know, the standard unison ipk works just fine with pdaxrom.
CL 860, cacko  1.23 full, Sandisk 512Mb CF, Kodak 256Mb SD, Symbol Spectrum24 wifi
SL 5500, standard rom, 256Mb SD, CF GPS