Last modified 16 years ago
Last modified on 01/26/09 15:45:44
Analysis
Overview
The regular backup of the project creates two backup CDs that can restore fully the project in case of data loss.
Task requirements
- Test if the previous backup contains all needed information for restoring
- Trac - wiki pages, settings, user accounts.
- Svn - data, settings, user accounts.
- Apache configurations
- Postgres databases.
- Testlink setup
- Modify the script if needed
- Execute the script
- Write the image on TWO dvds
- Make sure the copies are kept in different locations.
Task result
Backup media that is capable of restoring the whole project infrastructure.
Implementation idea
You can use SCS_BACKUP_R1 as similar consistency check is performed there.
Related
SCS_BACKUP_R0
SCS_BACKUP_R1
SCS_BACKUP_R2
How to demo
Explain what is done and where the media can be found.
Design
- Check if the previous back up contains all needed information for restore in the implementation phase.
- Because of its importance the postgres database must be set up to make daily back ups
- add following in the crontab
c# m h dom mon dow command 0 3 * * sun sh /home/scs/backup/backup.sh 0 9 * * * sh /home/scs/backup/psql_backup.sh
- add following in the crontab
- Create following script psql_backup.sh that backs up postgres database:
#!/bin/bash pg_dumpall -U scs -c -d > "/home/scs/backup/postgres/`date +%Y-%m-%d`.psql" gzip "/home/scs/backup/postgres/`date +%Y-%m-%d`.psql"
- Create script that backs up the build server in sophie:/home/build/backup/backup.sh (the function below creates recursive copy of the .hudson directory excluding the workspace directory):
#!/bin/bash dirname="/home/build/backup/`date +%Y-%m-%d`" isofile="`date +%Y-%m-%d`.iso" mkdir $dirname mkdir $dirname/.hudson/ copy() { for file in `ls "$1$2"` do if [ $file = 'Sophie' ] then file="Sophie 2.0" fi if [ `echo "$1$2$file" | grep /sophie2/ | wc -l` -eq 0 ] then if [ -d "$1$2$file" ] then mkdir "$dirname$2$file" copy "$1" "$2$file/" else cp "$1$2$file" "$dirname$2$file" fi else mkdir "$1$2$file" fi done } copy /home/build /.hudson/ tar -cvvf $dirname.tar $dirname gzip $dirname.tar rm -Rf $dirname
- Execute the scripts to create two back up DVD's.
- They should be stored separately.
Implementation
- The listed improvements of the back up scripts were made.
- Checked the previous back up
- Information stored in the back up dvd-s was sufficient to recover the project
- The scripts were run and two back dvd-s were created
- They are stored separately.
Testing
Comments
(Write comments for this or later revisions here.)