Script to back up entries

Created a script to back up my journal (current month) onto my shell account, in case Live Journal should tank at some future point. In its default state it downloads the current month, and is suitable for running every night. If you uncomment the foreach loops it will back up those months you plug in.

The strategy is to back up the current month every night right before midnight. The risk here is that if I backdate some entries to before the current month, they wouldn’t be backed up, and I would need to run those months again manually. Hmm.


set user="YOURNAME"
set dir="/home/YOURNAME/livejournal"
set year=`date +%Y`
set month=`date +%m`
set options="-q"

##foreach year ( 2002 )
##foreach month ( 01 02 )

set file="$dir/$user-$year-$month.xml"

set url="${year}&month=

wget $options --output-document=$file "$url"


0 thoughts on “Script to back up entries

Leave a Reply