Skip to content
Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Dreamhost backups: the appropriate incantation

elbeno, 21 September, 200821 September, 2008

Recently, and without much fanfare, Dreamhost introduced backup users. Each account gets a single backup user, whose function is to provide a remote backup. Dreamhost’s TOS states that regular user content must be served on the web: it is not intended to be a backup service. However, clearly the need for remote backups exists, and so they now allow 50GB (plus more at the rate of $0.10 per GB per month) of backup space for each account, accessed through the backup user.

So I’m backing up my email remotely. Just the job for a shell script. First things first: what do I need to backup? Well I use Evolution for email, and first I need to stop things from changing while I backup, and make sure I’m starting from the right place:

gconftool-2 --shutdown
evolution --force-shutdown
cd

Next, I need to backup three directories, and encrypt them of course. (The recipient here is changed for security purposes.)

tar -cz .gconf/apps/evolution .gnome2_private/Evolution .evolution 
    | gpg -e -r me@example.com -o mail.tar.gz.gpg

Now of course I need to upload the backup to the dreamhost backup server via SFTP (Once again the username here is changed for security purposes.):

sftp -b /dev/stdin mybackupusername@example.com <<EOF
put mail.tar.gz.gpg
bye
EOF

And finally remove the intermediate file:

rm mail.tar.gz.gpg

Having previously uploaded my authorized ssh key to avoid having to type a password, of course, this process is now automated. The only fly in the ointment is that Dreamhost backup users only support FTP or SFTP; ideally they’d have support for rsync.

Linux

Post navigation

Previous post
Next post

Related Posts

new router

5 March, 200729 July, 2007

Lately my SMC2804WBR has started to play up a bit (arbitrarily causing loss of connectivity), so this weekend I finally got around to replacing it. Mrs Elbeno was complaining of having to power cycle it 2 or 3 times a day. Where wireless broadband routers are concerned, experience has taught…

Read More

port triggering iptables config

11 March, 200729 July, 2007

I think the relevant iptables commands for port triggering with Bittorrent are: #iptables -t nat -A prerouting_wan -p tcp –dport 6881:6889 -j TRIGGER –trigger-type dnat –trigger-proto tcp –trigger-match 6881 –trigger-relate 6881-6889 This tells the router to do NAT on the packets arriving on the WAN TCP ports 6881 through 6889…

Read More

KDevelop: so much promise, but a bit rough around the edges

3 April, 200729 July, 2007

I’ve been trying to put together an app using KDevelop as my IDE. IDE-wise, it seems fine: all the usual stuff like syntax highlighting (of course) and code completion, etc. But I find its handling of the gnu autotools a bit rough. I haven’t found a way yet to specify…

Read More

Comment

  1. greatbiggary says:
    22 September, 2008 at 4:54 pm

    Excellent post. Thanks. I might just do this and add about $10-$15/mo. of extra space. Then I could actually off-site backup pretty much everything that’s really important to me. I appreciate you doing the shell legwork for me.

    Also, I almost posted this in your LJ feed again 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

©2026 Why is a raven like a writing desk? | WordPress Theme by SuperbThemes