PBI Backup and Recovery planning

Well to make a long story short. On my desktop every *mozilla program I install on BSD or GNU/Linux has funky issues with text fields, all other GTK+ apps are fine though. The only ones not to be borked are the PBI versions I’ve used on it and my laptop. So needless to say I was a little apprehensive about updating from Seamonkey 1.0.4 to 1.0.6. I like _stable_ software more then bleeding edge. Now I don’t mean to offend any one because I don’t but, huh www.pbidir.com ‘s content is not always ‘stable’ by the time its approved. So, having no way to reinstall Seamonkey 1.0.4. from PBI I desided I’d do a little test on how to back it up manually so I could reinstall it with the least effort. Now of course the fact that speed and power are to of my favorite reasons to use the command line, I’ll include a screen dump of my seassion as well as an explanation of doing it the *GUI* way. Be warned offten there is a /Programs/.sbin/program shell script to be backed up. I think its to do with making sure PBI apps use there /Programs/$1/libs directory, proper GTK/Pango crap and give us that annoying crash handler when they get killed. Any way here we go laddy. The best thing to do would be to open Konqueror as root, you can do that by using the K-Menu to find it, or type kdesu konqueror in konsole or use the run dialog. First lets look in /Programs/ to find are app, in my case SeaMonkey1.0.4. We want to back up this directory. A quick tarball will do the job, in Konqi you can do this with a right click since Ark is installed. I’d suggest ether a gzipped tar file or zip file depending on your needs. I keep my backups on ad0s1 which is a 20GB UFS2 partition. I have my mailbox and roaming profile on my USB stick so I backed that up as well. The “/usr/local/share/applnk/My Applications/Seamonkey” folder has our K-Menu entry so we want to back that up, beats rewritting the .desktop file(s). Plus to be safe and keep all my settings I backed up my ~/.mozilla folder. If this was a multi-user laptop a shell script would be good, I wrote a quick run’n’tosser in vi to back it up. If one wanted a script could be made to backup and restore the thing. After completing my backups I uninstalled the PBI and installed the new one, it had been downloading while I backed up.

Terry@Dixie$ cd /Programs                                                  4:17
Terry@Dixie$ su 4:18
Password:
Dixie# mkdir /Backups/Seamonkey1.0.4
Dixie# cd SeaMonkey1.0.4/
Dixie# ls
PBI.FirstRun.sh etc pangorc
PBI.RemoveScript.sh include seamonkey.png
PBI.SetupScript.sh lib share
bin libdata
Dixie# cd ..
Dixie# tar -czf SeaMonkey1.0.4_BACKUP.tar.tgz ./SeaMonkey1.0.4
Dixie# cp -r /usr/local/share/applnk/My Programs/SeaMonkey /Backups/Seamonkey1.0.4/SeaMonkey_KMenu_Entry.d
Dixie# mv SeaMonkey1.0.4_BACKUP.tar.tgz /Backups/Seamonkey1.0.4/
Dixie# ls /Backups/Seamonkey1.0.4/
SeaMonkey1.0.4_BACKUP.tar.tgz SeaMonkey_KMenu_Entry.d
Dixie# PBIdelete -list|grep -i Seamonkey
SeaMonkey1.0.4
Dixie# cp -rp /Lexar/Mozilla /Backups/Seamonkey1.0.4/
Dixie# cd /Backups/Seamonkey1.0.4/
Dixie# tar -czf ./SM_Mail.tar.gz /Lexar/Mail
tar: Removing leading '/' from member names
vi /Backups/Seamonkey1.0.4/profiledump.sh
#!/bin/sh

export PATH='/bin'

for n in `ls /usr/home/`
do
cp -rp /usr/home/$n/.mozilla /Backups/Seamonkey1.0.4/$n.mozilla
done
Dixie# chmod 700 .//profiledump.sh
Dixie# ./profiledump.sh
Dixie# ls -l
total 45478
-rw-r--r-- 1 root wheel 19905054 Dec 24 04:26 SM_Mail.tar.gz
-rw-r--r-- 1 root wheel 26620953 Dec 24 04:20 SeaMonkey1.0.4_BACKUP.tar.tgz
drwxr-xr-x 2 root wheel 512 Dec 24 04:23 SeaMonkey_KMenu_Entry.d
drwx------ 3 Terry Terry 512 Dec 21 21:48 Terry.mozilla
-rwx------ 1 root wheel 129 Dec 24 04:47 profiledump.sh
Dixie# PBIdelete -remove SeaMonkey1.0.4
Removing SeaMonkey1.0.4
Running custom removal script
Removing Directory
Cleaning PBI List
SeaMonkey1.0.4 was removed successfully!
Dixie#

To restore it I could have put things back as the were. There was no .sbin/seamonkey file to backup that I noticed so I’d hope it would’ve still worked but. Alas thats PC-BSD…