Last modified 16 years ago
Last modified on 12/20/08 16:41:06
Analysis
Overview
According to the new setup, the backup script should be modified and tested.
Task requirements
- Review the setup of the new server
- Create a backup script that does
- backup trac (Postgres tables, configuration files, paths, etc)
- backup repository (tables, configuration files, paths, etc)
- backup Apache (config files, structure, etc)
- backup Testlink (tables, configuration files, paths, etc)
- create an ISO file named YYYY-MM-DD.iso (or decide a better solution)
- see the old backup script for the previous backup script (see related section)
- Create two copies of the backup CD
Task result
A backup script.
Implementation idea
Review the current script, rewrite it to the current structure and add testlink and apache. Decide if there is other important information that should be backed up.
Related
How to demo
Explain the script using the comments in it.
Design
- The back up script was improved
- We're storing the following back up script on /home/scs/backup/backup.sh
#!/bin/bash dirname="`date +%Y-%m-%d`" isofile="`date +%Y-%m-%d`.iso" postgredump="pgdump" mkdir /home/scs/backup/$dirname mkdir /home/scs/backup/$dirname/apache/ ## Trac, testlink and svn cp -R /home/scs/svn/ /home/scs/backup/$dirname cp -R /home/scs/trac/ /home/scs/backup/$dirname cp -R /home/scs/testlink/ /home/scs/backup/$dirname ## Apache virtual host cp /etc/apache2/sites-available/trac /home/scs/backup/$dirname/apache/ ## PstgreSQL database pg_dumpall -U scs -c -d > /home/scs/backup/$dirname/$postgredump zip -r $dirname.zip $dirname mkisofs -r -o $dirname.iso $dirname.zip wodim $dirname.iso rm -Rf /home/scs/backup/$dirname rm $dirname.iso
- What the script does:
- it creates .zip file including all needed information for restoring our project, this includes:
- svn
- trac
- testlink
- apache (there could be problem with compatibility depending on apache version)
- creates .iso image with the .zip file named YYYY-MM-DD.iso
- burns the .iso file to cd
- it creates .zip file including all needed information for restoring our project, this includes:
Implementation
The script was used for creating a backup cd.
Testing
Comments
(Write comments for this or later revisions here.)