Top.Mail.Ru
? ?

Previous Entry | Next Entry

Dreamhost offers a personal backup service.  Here are some notes on what I did to get it working from my Microsoft Windows Vista system.

Install All Required Cygwin Modules


First, I installed any missing required modules for cygwin.  At first, I had trouble with ssh, because it complained it couldn't find cygssp-0.  Using cygcheck confirmed the missing library.

~$ cygcheck ssh
Found: C:\cygwin\bin\ssh.exe
Found: C:\cygwin\bin\ssh.exe
Found: C:\cygwin\bin\ssh.exe
C:\cygwin\bin\ssh.exe
  C:\cygwin\bin\cygcrypto-0.9.8.dll
    C:\cygwin\bin\cygwin1.dll
      C:\Windows\system32\ADVAPI32.DLL
        C:\Windows\system32\ntdll.dll
        C:\Windows\system32\KERNEL32.dll
        C:\Windows\system32\RPCRT4.dll
    C:\cygwin\bin\cygz.dll
      C:\cygwin\bin\cyggcc_s-1.dll
cygcheck: track_down: could not find cygssp-0.dll

Once I installed libsso0, rsync was working correctly, but required a password to be entered.

Setup Passwordless Login


Setting up passwordless login was really easy. In an sftp connection, I made a .ssh directory from my home backup server's directory, copied my cygwin's .ssh/id_dsa.pub to the new .ssh directory and renamed the file to authorized_keys.

Determining Directories and Files to Copy


I made an exclusion list of files not to backup and named that file excl.txt. Here's what the file contains:

*.obj
*.tmp
*.sbr
*.ilk
*.pch
*.pdb
*.idb
*.ncb
*.opt
*.plg
*.aps
*.dsw
*.pyc
*.pyd
*.bsc
*.pdb
*.projdata
*.projdata1
.svn/
.git/
.bzr/
.hg/

Then I made a shell script called, backup_to_dreamhost.sh, to backup only certain directories:

#!/bin/bash
rsync -e ssh -avz --exclude-from=excl.txt /cygdrive/c/Users/David/Documents user@b.dh.com:~/David
rsync -e ssh -avz --exclude-from=excl.txt /cygdrive/c/Users/David/Downloads user@b.dh.com:~/David
rsync -e ssh -avz --exclude-from=excl.txt /cygdrive/c/Users/David/Pictures user@b.dh.com:~/David
rsync -e ssh -avz --exclude-from=excl.txt /cygdrive/c/Users/David/Music user@b.dh.com:~/David
rsync -e ssh -avz --exclude-from=excl.txt --exclude=Pinnacle/ /cygdrive/c/Users/Public/Documents user@b.dh.com:~/Public
...

Note that occasionally I have to exclude some directories that contain massive amounts of video or temporary files. I can't copy my pictures and videos without taking up more than the free 50GB space allocated for backups.

Making Automatic Backups


I ran the shell script from within cygwin, and it worked. But now, how to make Vista run it? I created a DOS Batch script called, backup_to_dreamhost.bat. It contains only one line:

C: && chdir C:\cygwin\home\username && C:\cygwin\bin\bash --login ~/backup_to_dreamhost.sh

And from the Windows Task Scheduler, I created a recurring task that runs backup_to_dreamhost.bat.

Tags:

Comments

( 4 comments — Leave a comment )
sjonsvenson
Sep. 20th, 2010 08:33 pm (UTC)
Maybe I should move one of my domains to dreamhost. ^_^

BTW what about the speed?
dblume
Sep. 20th, 2010 09:41 pm (UTC)
Dreamhost's servers are located in Los Angeles, CA, USA, so speed to my personal PC is pretty fast.

But speed for backup isn't that important, right? The first backup is huge and slow. And all the subsequent rsync backups only send the files that've changed, so that'll go much more quickly, and I've set those to run at a time when nobody will want to be on the computer.
tpederson
Sep. 21st, 2010 12:41 am (UTC)
Looks like a nice setup but do the upload times kill you? I tried Mozy a while back and syncing was unworkable with my paltry upload speed.
dblume
Sep. 21st, 2010 04:14 am (UTC)
The first upload of everything took a few hours. I've set the recurring sync to 2:00pm on certain weekdays. Those incremental syncs only take a few minutes. (Note that I also compress the data along the line, it's in the rsync flags.)
( 4 comments — Leave a comment )

Links

Comments

  • dblume
    5 Mar 2019, 22:27
    Welcome back to LJ.
    Even if it's just one post :-P

    People moved all over the internet.
    I stil like Plurk the best.
  • dblume
    4 Mar 2019, 06:13
    Good to see you checking in at LJ again, too. No, I'm not online anywhere like we used to be at LJ and Plurk. I really liked having a place where we could share our thoughts in a long-form post that…
  • dblume
    4 Mar 2019, 03:33
    Good to "see" you checking in at LJ... and taking steps to preserve your LJ and Google+ histories!

    Even better to see "you" and not your Dead Man Switch kicking in... again.

    Do you have a primary…
  • dblume
    13 Jan 2018, 18:54
    I "Searched" some of your archive looking for the fluorescent bulb post, but couldn't find it through 2009-02-06, and before that, LiveJournal no longer offers pages of your feed, just daily access,…
  • dblume
    10 Jan 2018, 18:22
    Ha ha! How coincidental, I was thinking about light bulbs yesterday myself. One of my Instagram contacts mentioned that the EU regulates the types of light bulbs people can use in their homes in…
Powered by LiveJournal.com
Designed by Jared MacPherson