[wplug-internet] Backup script

Michael Semcheski mhsemcheski at gmail.com
Thu Dec 17 01:31:13 EST 2009


Thanks Vance -

That gave me the impetus to setup a script to do backups based on duplicity.

(Duplicity is a program that uses rdiff and gpg).

Its pretty clean.  I'm currently backing up my own VPS with a variant
of the script, and try a restore to make sure things work.  However,
mine is really simple (thanks to the fact that duplicity is perfectly
suited to this task.)

If we put it into a cron job, all it would require is:
1) we setup a GPG secret key (supersecret in the example script I
pasted below) for root at wplug.org.
2) we embed the GPG passphrase in the script that only lives in wplug.org:/root
3) for each person who wants to volunteer some hard disk space, we add
a line in /root/duplicators like this:
ssh://mhs@semcheski.com/backupdestination/
4) that person then needs to add the id_rsa.pub ssh key for
root at wplug.org to their authorized_keys file.

Here's the script:

#!/bin/bash

for duplicator in `cat duplicators`
do
    PASSPHRASE=supersecret duplicity / $duplicator -v6
--exclude-globbing-filelist duplicity-excludes 1> duplicity.log 2>
duplicity.error
done



On Wed, Dec 16, 2009 at 8:59 PM, Vance Kochenderfer <vkochend at nyx.net> wrote:
> Hi all-
>
> You may remember a discussion from some time ago
> <http://www.wplug.org/pipermail/wplug-internet/2009-June/date.html>
> about backing up the WPLUG server.  I have written up a script
> along the lines I proposed in that conversation.
>
> Actually, there are three scripts - one for doing backups, and two
> support scripts for setting things up.  Cruise through the
> attached archive if you have some time to kill.
>
> There is a readme file which goes into quite a bit of detail about
> the overall architecture, so I won't repeat that here.  Please see
> that file for the details and ask if you have questions it doesn't
> answer.
>
> While it should be complete, it has not been tested at all, so
> there are very likely bugs lurking within.  We need some people to
> volunteer disk space and bandwidth for testing and to eventually
> serve as targets for backups.
>
> Feedback is welcome!
>
> Vance Kochenderfer        |  "Get me out of these ropes and into a
> vkochend at nyx.net          |   good belt of Scotch"    -Nick Danger
>
> _______________________________________________
> wplug-internet mailing list
> wplug-internet at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug-internet
>
>


More information about the wplug-internet mailing list