Since I find myself re-flashing my BUG's root filesystem a lot, and since I want to make sure that my modifications and personalizations from my current working rootfs find their way onto the newly-flashed BUG, I've automated the process a little.
Until there's a more official way to backup and restore your BUG, I'll share how I do it.
First, I track changes in my BUG's /etc directory in an etc directory in my home directory. Currently, my ~/etc contains the following files: hosts, resolv.conf, asterisk, network and tsp. The first two are configuration files, and the rest are directories containing more config files.
I also make sure to install any new binaries or scripts in /usr/local/bin, or somewhere in my home directory (like ~/bin). If a binary is installed via an .ipk file, I keep the original installer file in my ~/ipkgs directory so that I can reinstall it onto the new rootfs with the ipkg install package_name command. If a package creates config files in /etc, I copy them into my home ~/etc directory before performing the backup.
Before flashing (thereby wiping) my BUG's rootfs, I insert my VonHippel Module and plug in an ext3-formatted USB stick, which will mount at /media/sda1, and run the following script from it:
# bug-backup.sh -- 1/2009, Al Gordon
# Backs up your BUG configs to a USB stick.
tar czvf /media/sda1/bug-backup.tar.gz /home/root /usr/local
After flashing my BUG's rootfs, I boot the BUG, plug the VH module and USB stick back in, and run the following restore script from it:
# bug-restore.sh -- 1/2009, Al Gordon
# Restores your BUG home directory and /usr/local
# from a USB stick backup. If you backup /etc files
# in an etc directory in your home dir, it will copy those files over as well.
echo "Restoring backups..."
tar xzvf /media/sda1/bug-backup.tar.gz
if [-d ~/etc]
cp -a ~/etc/* /etc
Don't forget to make the backup and recovery scripts executable with chmod +x /media/sda1/bug-*.sh .
The scripts are incredibly simple, and are easy to modify to backup data other than your BUG's /home/root and /usr/local directories.
These scripts do not track your BUG app data in /usr/share/java/apps and /usr/share/java/storage, but you can add those paths to the backup script if you like.