Nightly Backups

backup_nightly.sh.html is a shell script to perform nightly backups of important data directories.  This is the script version customized for the system ottawa as sourced from the backup_nightly_programs.cfg file.

#!/bin/bash

RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh

# backup ottawa's /home/brahms

#$RSYNC -vap --delete --rsh=$SSH /home/brahms calgary-bak:/home

# backup /home/pikt

$RSYNC -vap --delete --rsh=$SSH /home/pikt /arc/ottawa/home
$RSYNC -vap --delete --rsh=$SSH /home/pikt calgary-bak:/arc/ottawa/home

# backup /etc

$RSYNC -vap --delete --rsh=$SSH ottawa-bak:/etc /arc/ottawa
$RSYNC -vap --delete --rsh=$SSH toronto-bak:/etc /arc/toronto
$RSYNC -vap --delete --rsh=$SSH calgary-bak:/etc /arc/calgary
$RSYNC -vap --delete --rsh=$SSH vancouver-bak:/etc /arc/vancouver
$RSYNC -vap --delete --rsh=$SSH montreal-bak:/etc /arc/montreal
$RSYNC -vap --delete --rsh=$SSH winnipeg-bak:/etc /arc/winnipeg

# backup /usr/local

$RSYNC -vap --delete --rsh=$SSH ottawa-bak:/usr/local /arc/ottawa/usr
$RSYNC -vap --delete --rsh=$SSH toronto-bak:/usr/local /arc/toronto/usr
$RSYNC -vap --delete --rsh=$SSH calgary-bak:/usr/local /arc/calgary/usr
$RSYNC -vap --delete --rsh=$SSH vancouver-bak:/usr/local /arc/vancouver/usr
$RSYNC -vap --delete --rsh=$SSH montreal-bak:/usr/local /arc/montreal/usr
$RSYNC -vap --delete --rsh=$SSH winnipeg-bak:/usr/local /arc/winnipeg/usr

# backup /var/www

$RSYNC -vap --delete --rsh=$SSH ottawa-bak:/var/www /arc/ottawa/var
$RSYNC -vap --delete --rsh=$SSH toronto-bak:/var/www /arc/toronto/var
$RSYNC -vap --delete --rsh=$SSH vancouver-bak:/var/www /arc/vancouver/var

# backup /var/log/httpd

$RSYNC -vap --delete --rsh=$SSH
       toronto-bak:/var/log/httpd /arc/toronto/var/log
$RSYNC -vap --delete --rsh=$SSH
       vancouver-bak:/var/log/httpd /arc/vancouver/var/log

# backup /usr/lib/mailman

$RSYNC -vap --delete --rsh=$SSH
       toronto-bak:/usr/lib/mailman /arc/toronto/usr/lib

# backup /var/lib/mailman

$RSYNC -vap --delete --rsh=$SSH
       toronto-bak:/var/lib/mailman /arc/toronto/var/lib

Open Hand For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2008-03-27.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
backup system
configuration
Pikt script