Article: Backup your Backpack pages locally
I use wget in this shell commands to get a periodical backup of all information in my backpack accounts, so if i'm not online, i can at least browse the offline version. i have them on a cronjob, so i get a daily export file and a weekly mirror.
note that in most of the scripts i first change to the directory i want it all to be saved, and yes, this is *nix Bash Shell syntax, so change it according to your OS/CLI.
get cookie
this command is to be run once, it gets all the cookie (login) info.
daily export
this command exports your account to an xml file calledexport.xmlin the working directory. if you prefer to download the file with its original name, take the--output-document=export.xmloption out.
mirror directory first run
this makes a complete mirror of my backpack account with current timestamps. i run this once a month just in case.
weekly mirror directory backup
this makes a complete mirror of my backpack account but just downloading the files that have changed by checking the last-modify date.
so the three shell scripts ran by the cron jobs (daily, weekly and monthly) look like this:
daily:
(/Users/[your_username]/Documents/backpackit/cron.daily.sh)
weekly:
(/Users/[your_username]/Documents/backpackit/cron.weekly.sh)
monthly:
(/Users/[your_username]/Documents/backpackit/cron.monthly.sh)
and the cron jobs look like this (copied at the end of the respective file)
daily
(/private/etc/periodic/daily/500.daily)
weekly
(/private/etc/periodic/weekly/500.weekly)
monthly:
(/private/etc/periodic/monthly/500.monthly)
note: this locations are for MacOS X 10.4.3 Tiger
final notes:
- please be aware that the -r option (recursive) can add a lot of overhead to your process and your connection, mostly if you keep the retry option (-t[n of retries]) high.
- more information about wget commands in the wget online manual
