Backing up Your Roller Blog Resources
|
I already know how to save a local copy of all of my posts to my blog at blogs.sun.com. Now I want to save a local copy of all the resources files that I use (there are over 1100 of them). |
I was hoping it would have been as simple as doing:
% wget -r -l 2 --user=richb --password=XXXXXXXX -np http://blogs.sun.com/richb/resource
but that didn't want to work, although it has no problem with individual files in that directory. For example:
% wget -r -l 2 --user=richb --password=XXXXXXXX -np http://blogs.sun.com/richb/resource/links.jpgworks just fine.
Therefore I needed to create a list of all the files under my resource directory, and then wget them individually.
I logged into my blog and went to the "File Uploads" page. I then used my browser's "File->Save Page As..." to save that web page.
I then wrote a simple Python script to parse that file.
Here's a few notes to describe what you need to do if you want to use this too. I'm sure there are a hundred ways to skin this cat. This is one of them. It works for me.
- Save the get_files.py script
to disk and set its permissions to include executable:
% chmod +x get_files.py - Replace "richb" with your Blog username.
- Replace "XXXXXXXX" with your Blog password.
- Save your own copy of your "File Downloads" web page and then give
the full path name of that file as a parameter to the script. For
example:
% get_files.py /export/home/richb/Blog/Backup/resources/uploadFiles.do.html - Your resources will be stored under a sub-directory called
blogs.sun.com/<username>/resource under your current
directory.
I'd be happy to throw all of this away if somebody can tell me why the original wget command didn't work.
( Oct 04 2006, 08:38:28 AM PDT ) [Listen] Permalink Comments [2]











