myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] Backup plans


From: Don Cruickshank
Subject: [myexperiment-hackers] Backup plans
Date: Tue, 13 Nov 2007 12:04:02 +0000
User-agent: Mutt/1.4.2.2i

Hi all,

Regarding backup plans, I'm suggesting this as a first stab:

On a periodic basis, we scp (secure copy) the backup from tents (wallace's
current home) to rosalind.  This is best achieved by use of a public
certificate, which Stian or Jun Zhao should be able to provide.

In the cron'd job on rosalind, it would:

(1) scp the public.tgz and wallace.sql files from tents
(2) erase the database on wallace
(3) load the backup dump into the database
(4) erase the public/pictures and public/workflow directories
(5) unpack the public.tgz file
(6) restart the server

For the more technically minded:

-------------------------------------------------------------------------------
#!/bin/bash

MYEXP_BACKUPS_DIR=~/myexp_backup_files

scp 'address@hidden:*' ${MYEXP_BACKUPS_DIR} || exit

mysql --user=root -e 'drop database m2_production'
mysql --user=root -e 'create database m2_production'
mysql --user=root m2_production < ${MYEXP_BACKUPS_DIR}/wallace.sql

rm -rf public/pictues public/workflow
tar xzf ${MYEXP_BACKUPS_DIR}/public.tgz

/etc/init.d/wallace restart
-------------------------------------------------------------------------------

Don.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]