Manual backup and restore
speculatrix (Talk | contribs) |
speculatrix (Talk | contribs) |
||
Line 41: | Line 41: | ||
BTW, be sure not to be running the application which uses the files being restored! | BTW, be sure not to be running the application which uses the files being restored! | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
===Bookmarks=== | ===Bookmarks=== | ||
Line 125: | Line 115: | ||
When RSS reader is started, everything should be back the way it was before. | When RSS reader is started, everything should be back the way it was before. | ||
+ | ===wifi access points=== | ||
+ | |||
+ | Although you'll have to manually re-enter the wifi access points, it's easier when you don't have to tediously type in WPA pass phrases as you can copy/paste then from the file created during the backup. Restore this file: | ||
+ | |||
+ | <pre> | ||
+ | cd /home/archive/mytablet/root | ||
+ | scp -pr wifi-list.txt root@mytablet.example.com: | ||
+ | </pre> | ||
+ | |||
+ | Then view this file in a shell (install xterm, run it, "sudo becomeroot", "more wifi-list.txt" whilst setting up access to a wireless AP. | ||
[[Category:Users]] | [[Category:Users]] |
Revision as of 22:45, 29 November 2009
Contents |
Manual Backup And Restore
Imagine you've hacked around your tablet so much you want to back it up, wipe it clean and restore, rather than use the standard system backup/restore which could revert the problems too!
The best strategy is to back up the entire tablet, excluding only things you definitely don't need rather than try and cherry pick things, and then restore specific files and directories.
Backing up the entire tablet
The best program to use is "rsync" - this program is in the maemo extras repository. A suitable backup script is shown below, save it to /usr/local/bin/backup as a plain text file. You can then "chmod ugo+x /usr/local/bin/backup" and run it (as root please). Change "mypc.example.com" to the hostname (or IP address) of your computer, and the target directory from /home/archive/blahblah to /whatever. Note the "dpkg -l" to get a list of installed packages, this will help you remember what you had installed! The "gconf" bit lists out all the wifi access points defined so that you can copy/paste the details back in later.
#!/bin/sh dpkg -l > /root/dpkg-l.txt gconftool -R /system/osso/connectivity/IAP > /root/wifi-list.txt rsync -avz \ --exclude=/dev \ --exclude=/media \ --exclude=/mnt/initfs \ --exclude=/proc \ --exclude=/sys \ / \ mypc.example.com:/home/archive/mytablet/
Wiping Clean
Wiping your table clean is achieved by reflashing. If you upgraded to your current version of maemo rather than flashing the latest version, you'll get a small performance boost by doing this. Flash according to Updating_the_tablet_firmware.
Restoring
Backing up and reflashing were the easy parts, restoring takes a bit longer, and is a bit more tedious. This is where you should only restore things that were definitely properly working before you started, restoring broken configuration files is a bad idea!
As well as reinstalling all the applications you want, you'll need to install (dropbear) ssh & sshd in order to copy the files back on. Be sure to set a password for user "user" and also probably root!
You might like to do a total backup of your tablet immediately after restoring all the applications in order to have a baseline comparison.
BTW, be sure not to be running the application which uses the files being restored!
Bookmarks
Bookmarks are easy.
Close the browser first, then simply copy them from your archive to the tablet thus:
cd /home/archive/mytablet/home/user/.bookmarks scp -pr * user@mytablet.example.com:/home/user/.bookmarks
The bookmarks should appear straight away, either in the browser or in the home screen short-cut.
IM/Chat and SIP Accounts
The various jabber and SIP accounts are stored in var/lib/gconf/apps/telepathy/mc/accounts. It's probably a good idea to set your presence to "off" before trying to restore, which you do as follows:
cd /home/archive/mytablet/var/lib/gconf/apps/telepathy/mc/accounts scp -pr * user@mytablet.example.com:/var/lib/gconf/apps/telepathy/mc/accounts
Contacts
Contacts are stored in /home/user/.osso-abook, however, you need to create a dummy entry BEFORE restoring the files.
So, run the accounts application and create a contact, any old rubbish will do.
Then exit the contacts application and restore the files thus:
cd /home/archive/mytablet/home/user/.osso-abook scp -pr . user@mytablet:/home/user/.osso-abook
Email (modest)
I'm stuck on this one. Restoring /home/users/.modest and /var/lib/gconf/apps/modest didn't work.
gPodder
Close gpodder. Copy the gpodder config directory back thus:
cd /home/archive/mytablet/home/user/.config/gpodder scp -pr * user@mytablet.example.com:/home/user/.config/gpodder
Since gpodder keeps the downloaded podcast audio files on a flash memory card, they should be available immediately.
OpenVPN
It might seem obvious, but if you used the openvpn applet and imported configurations, you might not know the configuration files live in /etc/openvpn
When you copy them over, be sure to have them owned by user root, group root, and protection u=rw,go=
Also, don't trample over the maemo-update-resolvconf script, keep the one that came with the fresh flash install; it probably won't matter as I don't think it's changed much if ever, but best to stick to the package maintainer's version.
RSS Feeds
The RSS feeds are stored as a bunch of files, very easy to restore.
Close rss reader. Copy the files back thus:
cd /home/archive/mytablet/home/user/.osso_rss_feed_reader scp -pr * user@mytablet.example.com:/home/user/.osso_rss_feed_reader
When RSS reader is started, everything should be back the way it was before.
wifi access points
Although you'll have to manually re-enter the wifi access points, it's easier when you don't have to tediously type in WPA pass phrases as you can copy/paste then from the file created during the backup. Restore this file:
cd /home/archive/mytablet/root scp -pr wifi-list.txt root@mytablet.example.com:
Then view this file in a shell (install xterm, run it, "sudo becomeroot", "more wifi-list.txt" whilst setting up access to a wireless AP.