wiki:SCS_BACKUP_R2
Last modified 3 years ago Last modified on 12/20/08 16:41:06

Pages linking to SCS_BACKUP_R2:
TASK_INDEX
SCS_BACKUP_R3

Ticket Summary Owner Status Type Component Priority Effort Importance
#1375 SCS_BACKUP_R2 todor closed planned_task PROJECT_COMMUNITY 3 0.5 90

Reported by Astea, 4 years ago.

Description

wiki page: SCS_BACKUP_R2 - effort: 0.5d

Analysis_owners

deyan

Analysis_reviewers

todor

Analysis_score

3

Design_owners

todor

Design_reviewers

meddle

Design_score

4

Imp._owners

todor

Imp._reviewers

pap

Imp._score

3.5

Test_score

0

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.

dan-server:/backup/backup.sh

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

Implementation

The script was used for creating a backup cd.

Testing

Comments

(Write comments for this or later revisions here.)