Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.Login to remote server (part of Thalia cluster) as root user.

2.Create needed directories

Code Block

mkdir /root/.ssh

...


mkdir /home/rmtbckup

3.Create ssh keyunmigrated-wiki-markup

Code Block

ssh-keygen 

...

-t rsa 

...

-b 1024

...

[press return until you are back to command line]

Do not use encrypted private keys, as this will cause the cron job to fail. – do not use encrypted private keys, as this will cause the cron job to fail\]

4.Copy ssh key to eurydice.mit.edu

Code Block

scp /root/.ssh/id_rsa.pub \

...


    rmtbckup@eurydice.mit.edu:/home/rmtbckup/.ssh/`hostname`-id_rsa.pub

...


5.Login to eurydice as rmtbckup   \[note, this should be done from another thalia system, as Ubuntu does not currently have working Kerberos configurations\]

6.Add public key to authorized key lists and deleted from eurydice

     1.On Eurydice: Wiki Markup    

Code Block

cd /home/rmtbckup/.ssh

...

cat \[remote hostname\]-id_rsa.pub >> authorized_keys

...

rm \[remote hostname\]-id_rsa.pub

     2.On remote server:    

Code Block

cd /root/.ssh

...


cat id_rsa.pub >> authorized_keys

7.Install the zinc-backup.py script into /root on the remote server, and add the following line to /var/spool/cron/root:

Code Block

30 3 * * * /root/zinc-backup.py >> /loc/logs/zinc-backup.log 2>&1 &

8.Test backup per manual backup procedures (below)

...

3.Login to the MySQL server of the Thalia cluster as root, and run the backup script:

Code Block

/root/zinc-backup.py

Alternatively, you could backup the database with the myslqdump command:

Code Block

mysqldump --single-transaction -q -B "--{+}dbname{+}--" -r /home/rmtbckup/`hostname`-db-`date

...

 %F+%H+$M`.sql

4.Login to Alfresco server of the Thalia cluster as root, and run the backup script:

Code Block

/root/zinc-backup.py

Alternatively, you could backup the filestore with the tar command:unmigrated-wiki-markup

Code Block

tar 

...

-czf /home/rmtbckup/`hostname`-file-`date

...

\+%F-%H-%M`.tgz /home/

...

[alf_home

...

]/alf_data/

...

*

5.Login to Eurydice as rmtbckup and check that the files are there.

...

2.Login to the top level Thalia servers in the cluster, and stop Thalia.  Currently, this is isda-thalia5 and isda-thalia8.

Code Block

/etc/init.d/web stop

3.Login to the Alfresco server in the cluster, and stop Alfresco.

Code Block

/etc/init.d/web stop

4.Clear the filestore.

Code Block

rm -

...

rf $ALF_HOME/alf_data

5.Untar the file backup:unmigrated-wiki-markup

Code Block

tar 

...

-xjvf /home/rmtbckup/`hostname`-file-

...

[date of backup

...

].bz2 $ALF_HOME/alf_data

6.Login to the MySQL server, and dump the database.  The database name is available in the alfresco/extensions directory in the custom-db-connections.properties file.unmigrated-wiki-markup

Code Block

mysql
drop database 

...

[db.name

...

];
revoke all privileges, grant option from 

...

[db.username

...

]@*;
drop user 

...

[db.username

...

]@*;

7.Source the sql backup, and grant privledges to the Alfresco user.  See custom-db-connections.properites.unmigrated-wiki-markup

Code Block

source /home/rmtbckup/

...

[hostname

...

]-db-

...

[db.name

...

]-

...

[date of backup

...

].sql;
grant all on 

...

[db.name

...

].

...

* to 

...

[db.username

...

]@'localhost' identified by 

...

[db.password

...

] with
grant option;
grant all on 

...

[db.name

...

].

...

* to 

...

[db.username

...

]@'localhost.localdomain' identified by 

...

[db.password

...

] with grant option;
grant all on 

...

[db.name

...

].

...

* to 

...

[db.username

...

]@

...

[IP of Alfresco server

...

] identified by 

...

[db.password

...

] with grant option;
grant all on 

...

[db.name

...

].

...

* to 

...

[db.username

...

]@

...

[hostname of Alfresco server

...

] identified by 

...

[db.password

...

] with grant option;

8.Login to Alfresco server and restart Alfresco.

Code Block

/etc/init.d/web start

9.Login to Thalia server and restart Thalia.

Code Block

/etc/init.d/web start

10.Test cluster functionality.