[volunteers] Speaker Coordinator Introduction

Rick Moen rick at linuxmafia.com
Tue Mar 29 18:39:12 PST 2011

Quoting Rick Moen (rick at linuxmafia.com):

> I'm now doing a manual initial backup of just those 239 MB of files,
> onto my own server:
> # rsync -e /usr/bin/ssh -ax "lists.svlug.org:/var/local/mailman/archives/private/{carpool.mbox,jobs.mbox,officers.mbox,smaug.mbox,speakers.mbox,svlug-announce.mbox,svlug.mbox,volunteers.mbox,volunteers-old.mbox,web-team.mbox}/" /usr/local/src/rickstuff/svlug/mboxes

[Corrected omission of quotation mark from the command line.]

Above is now done.

Worst case, if the mailing lists machine dies right now, we can have
everything back in 24 hours.  As mentioned separately, we are not yet
dumping and capturing the Mailman .db and .pck files that store mailing
list definitions / state.  (That is a FIXME.)

Let's work on automating the mbox backup for the future.  First, we need a
no-passphrase keypair.  Let's do it on the linuxmafia.com side:

linuxmafia:~# ssh-keygen -t rsa -f svlugbackup
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in svlugbackup.
Your public key has been saved in svlugbackup.pub.
The key fingerprint is:
2f:53:15:30:59:39:3b:f1:af:27:69:3b:1e:b6:8f:57 root at linuxmafia.com
The key's randomart image is:
+--[ RSA 2048]----+
|          o+o.   |
|          ..+.   |
|            .=   |
|           .o .  |
|        S .  . . |
|         o      E|
|        o .   oo.|
|         o   .*+o|
|             o=B.|

linuxmafia:~# mv svlugbackup /root/.ssh
linuxmafia:~# scp svlugbackup.pub lists.svlug.org:
root at lists.svlug.org's password: 
svlugbackup.pub                                  100%  609     0.6KB/s 00:00    

On lists.svlug.org:
cat /root/svlugbackup.pub >> /root/.ssh/authorized_keys

Test the keypair from the linuxmafia.com side:

# rsync -e "/usr/bin/ssh -i /root/.ssh/svlugbackup" -ax "lists.svlug.org:/var/local/mailman/archives/private/{carpool.mbox,jobs.mbox,officers.mbox,smaug.mbox,speakers.mbox,svlug-announce.mbox,svlug.mbox,volunteers.mbox,volunteers-old.mbox,web-team.mbox}/" /usr/local/src/rickstuff/svlug/mboxes

OK, that works.  (I mv'd one of the mbox files to /tmp on
linuxmafia.com, and ensured that rsync rebuilt it.)

Now, the automation part.  Add to /etc/crontab on linuxmafia.com:

3 15    * * *   root    rsync -e "/usr/bin/ssh -i /root/.ssh/svlugbackup" -ax "lists.svlug.org:/var/local/mailman/archives/private/{carpool.mbox,jobs.mbox,officers.mbox,smaug.mbox,speakers.mbox,svlug-announce.mbox,svlug.mbox,volunteers.mbox,volunteers-old.mbox,web-team.mbox}/" /usr/local/src/rickstuff/svlug/mboxes

OK, that _should_ suffice to refresh my backup of the mboxes at 3:15 AM
every night.  I'll have to check, tomorrow or so, to make sure that works.
(Crontabs need full pathspecs, and I've taken care of that bit.  Unless
there's something else dodgy like missing pttys are such, it should go
through, but one should not assume until it's tested.)

There are a lot more careful ways to do such things, but I've learned
over the years in system administration that the sloppy but adequate
solution that you actually do beats the better one that you're always 
about to get around to, every time.

More information about the volunteers mailing list