Ruru tech specs
From Transmission
Contents |
Base System
- Machine name: archive
- User: ruangrupa
- Password: ruru
- Partitions:
- sda1: 20G system (/)
- sda2: 470G data (/var)
- sda3: 10G swap
- sdb1: 500G backups (/backup)
- /var/opt symlinked to /opt
- apt source changed to "deb dl2.foss-id.web.id/ubuntu hardy ..."
- system updated
- network-manager removed
- apt-get install apache2 build-essential python2.4 flvtool2 mencoder ffmpeg2theora python-cheetah python-twisted postfix backupninja smartmontools smart-notifier
- add these two lines to /etc/smartd.conf:
/dev/sda -a -d sat -m emailtonotify@foo.bar,otheremailtonotify@foo.bar /dev/sdb -a -d sat -m emailtonotify@foo.bar,otheremailtonotify@foo.bar
Network Setup
- /etc/network/interfaces:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.10 netmask 255.255.255.0 gateway 192.168.0.1
- /etc/resolv.conf:
search ruru nameserver 127.0.0.1
- /etc/hosts:
... 127.0.1.1 archive #127.0.1.2 video #127.0.1.3 plumi-prod #127.0.1.4 plumi-dev ...
Router Setup - Linksys WRT54G2
- address 192.168.0.1
- netmask 255.255.255.0
- host name: wifi
- Domain name: ruru
- DNS Servers: 192.168.0.10 202.134.0.155 222.123.204.34
- DHCP 192.168.0.100 ->
Service Configuration
Zope/Plone
Development Instance
- Plone 2.5.5 installed via unified installer. If want plone to be installed some other than /opt/Plone-2.5.5 you need to edit install.sh in to change $PLONE_HOME
wget http://launchpad.net/plone/2.5/2.5.5/+download/Plone-2.5.5-UnifiedInstaller.tgz tar zxvf Plone-2.5.5-UnifiedInstaller.tgz sudo mkdir /opt/plone/ sudo mkdir /opt/plone/devel sudo mv Plone-2.5.5-UnifiedInstaller /opt/ cd /opt/Plone-2.5.5-UnifiedInstaller
Edit install.sh to make $PLONE_HOME=/opt/plone/devel/Plone-2.5.5
sudo ./install.sh
- Plumi 0.2.3 installed:
wget http://andycat.engagemedia.org/plumi-0.2.3-final.tgz sudo mv plumi-0.2.3-final.tgz /opt/plone/devel cd /opt/plone/devel sudo tar xvfz plumi-0.2.3-final.tgz
- imsvdex installed into plone instance:
sudo /opt/plone/devel/Plone-2.5.5/Python-2.4.4/bin/easy_install imsvdex
- added to /opt/plone/devel/Plone-2.5.5/zeocluster/client1/etc/zope.conf
products /opt/plone/devel/plumi-0.2.3-final
- Zope ports changed:
- port-base set to 1000 in /opt/plone/devel/Plone-2.5.5/zeocluster/client1/etc/zope.conf and /opt/plone/devel/Plone-2.5.5/zeocluster/client2/etc/zope.conf
- zodb_db main/server set to localhost:9100 in /opt/plone/devel/Plone-2.5.5/zeocluster/client1/etc/zope.conf and /opt/plone/devel/Plone-2.5.5/zeocluster/client2/etc/zope.conf
- zeo/address set to 9100 in /opt/plone/devel/Plone-2.5.5/zeocluster/server/etc/zeo.conf
- start zope by:
/opt/plone/devel/Plone-2.5.5/zeocluster/bin/startcluster.sh
- Plone site with ID 'plumi-devel' was added to zope via the ZMI ( http://localhost:9080/manage from the server. Log in as admin, password as per /opt/plone/devel/Plone-2.5.5/adminPassword.txt)
- Go to plone site ( http://localhost:9080/plumi-devel),
- Go to Preferences->Mail Settings. Set mail server to localhost
- Go to Preferences->Portal Settings to set "Allow users to choose their initial password"
- Go to Preferences->Add/Remove Products, then install ATVideo and PlumiSkin products
Production Instance
- Plone 2.5.5 installed via unified installer. If want plone to be installed some other than /opt/Plone-2.5.5 you need to edit install.sh in to change $PLONE_HOME
wget http://launchpad.net/plone/2.5/2.5.5/+download/Plone-2.5.5-UnifiedInstaller.tgz tar zxvf Plone-2.5.5-UnifiedInstaller.tgz sudo mkdir /opt/plone/ sudo mkdir /opt/plone/prod sudo mv Plone-2.5.5-UnifiedInstaller /opt/ cd /opt/Plone-2.5.5-UnifiedInstaller
Edit install.sh to make $PLONE_HOME=/opt/plone/prod/Plone-2.5.5
sudo ./install.sh
- Plumi 0.2.3 installed:
wget http://andycat.engagemedia.org/plumi-0.2.3-final.tgz sudo mv plumi-0.2.3-final.tgz /opt/plone/prod cd /opt/plone/prod sudo tar xvfz plumi-0.2.3-final.tgz
- imsvdex installed into plone instance:
sudo /opt/plone/prod/Plone-2.5.5/Python-2.4.4/bin/easy_install imsvdex
- added to /opt/plone/prod/Plone-2.5.5/zeocluster/client1/etc/zope.conf and /opt/plone/prod/Plone-2.5.5/zeocluster/client2/etc/zope.conf:
products /opt/plone/prod/plumi-0.2.3-final
- start zope by:
/opt/plone/prod/Plone-2.5.5/zeocluster/bin/startcluster.sh
- Plone site with ID 'plumi-prod' was added to zope via the ZMI ( http://localhost:8080/manage from the server. Log in as admin, password as per /opt/plone/prod/Plone-2.5.5/adminPassword.txt)
- Go to plone site ( http://localhost:9080/plumi-prod),
- Go to Preferences->Mail Settings. Set mail server to localhost
- Go to Preferences->Portal Settings to set "Allow users to choose their initial password"
- Go to Preferences->Add/Remove Products, then install ATVideo and PlumiSkin products.
BIND/DNS Server Configuration
- /etc/bind/named.conf.local:
zone "ruru" {
type master;
file "/etc/bind/zones/ruru.zone";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/ruru-rev.zone";
};
- /etc/bind/named.conf.options changed to (forwarders should be changed to the ISPs DNS servers):
options {
directory "/var/cache/bind";
forwarders {
202.134.0.155;
222.124.204.34;
203.130.196.6;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
- /etc/bind/zones/ruru.zone added (192.168.0.10 should be changed to IP address of server on the network, and the serial number (2009063002) should be changed every time this file is changed):
$TTL 259200
@ IN SOA ns1.ruru. vik.engagemedia.org. (
2009063002 ;serial, todays date + todays serial#
14400 ; refresh after 4 hours
7200 ; retry every 2 hours
2419200 ; expire in 4 weeks
86400 ) ; minimum TTL 1 day
IN NS ns1.ruru. ;Inet address of name server
IN A 192.168.0.10 ;the static IP of this machine on the network/LAN
ns1 IN A 192.168.0.10 ;same as above
; the local server
plumi-devel IN CNAME ns1
plumi-prod IN CNAME ns1
video IN CNAME ns1
archive IN CNAME ns1
- /etc/bind/zones/ruru-rev.zone added:
$TTL 259200
@ IN SOA ns1.ruru. vik.engagemedia.org. (
2009070201 ;serial, todays date + todays serial#
14400 ; refresh after 4 hours
7200 ; retry every 2 hours
2419200 ; expire in 4 weeks
86400 ) ; minimum TTL 1 day
IN NS ns1.ruru. ;Inet address of name server
10 PTR ns1.ruru.
Apache
- proxy, proxy_http and rewrite mods enabled
sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod rewrite
- add to /etc/apache2/apache2.conf:
ServerName archive.ruru NameVirtualHost *:80
- create /etc/apache2/sites-available/ruru-plumi-prod:
<VirtualHost *:80>
ServerName archive.ruru
ServerAlias archive video.ruru video plumi-prod.ruru plumi-prod 192.168.0.10
ServerAdmin webmaster@localhost
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
# Deny from none
Allow from all
</Directory>
<Location />
Order Allow,Deny
Deny from none
Allow from all
</Location>
# A place to put flv files - this can be anywhere as long as the URI for the dir
# matches the URI for the RewriteCond statements below.
Alias /flv-prod "/var/www/flv/flv-prod/"
<Directory "/var/www/flv/flv-prod">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/plumi-prod-error.log
LogLevel warn
CustomLog /var/log/apache2/plumi-prod-access.log combined
ServerSignature On
RewriteEngine On
#RewriteLog "/var/log/apache2/plumi-prod-rw.log"
#RewriteLogLevel 3
RewriteCond %{REQUEST_URI} !^/flv-prod
# ^^^^^^^^^
# This should be the same as the URI to the Alias/Directory set above
# Normalize URLs by removing trainling /'s
RewriteRule ^/(.*)/$ http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi-prod/VirtualHostRoot/$1 [L,P]
# ^^^^ ^^^^^
# port number Zope is running on ID of plone site when you first created it
# (e.g. http://localhost:8080/plumi - ID is 'plumi')
RewriteCond %{REQUEST_URI} !^/flv-prod
# ^^^^^^^^^
# This should be the same as the URI to the Alias/Directory set above
# Pass all other URLs straight through
RewriteRule ^/(.*)$ http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi-prod/VirtualHostRoot/$1 [L,P]
# ^^^^ ^^^^^
# port number Zope is running on ID of plone site when you first created it
# (e.g. http://localhost:8080/plumi - ID is 'plumi')
</VirtualHost>
- create /etc/apache2/sites-available/ruru-plumi-devel:
<VirtualHost *:80>
ServerName plumi-devel.ruru
ServerAlias plumi-devel
ServerAdmin webmaster@localhost
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
# Deny from none
Allow from all
</Directory>
<Location />
Order Allow,Deny
Deny from none
Allow from all
</Location>
# A place to put flv files - this can be anywhere as long as the URI for the dir
# matches the URI for the RewriteCond statements below.
Alias /flv-devel "/var/www/flv/flv-devel/"
<Directory "/var/www/flv/flv-devel">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/plumi-devel-error.log
LogLevel warn
CustomLog /var/log/apache2/plumi-devel-access.log combined
ServerSignature On
RewriteEngine On
#RewriteLog "/var/log/apache2/plumi-devel-rw.log"
#RewriteLogLevel 3
RewriteCond %{REQUEST_URI} !^/flv-devel
# ^^^^^^^^^
# This should be the same as the URI to the Alias/Directory set above
# Normalize URLs by removing trainling /'s
RewriteRule ^/(.*)/$ http://127.0.0.1:9080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi-devel/VirtualHostRoot/$1 [L,P]
# ^^^^ ^^^^^
# port number Zope is running on ID of plone site when you first created it
# (e.g. http://localhost:8080/plumi - ID is 'plumi')
RewriteCond %{REQUEST_URI} !^/flv-devel
# ^^^^^^^^^
# This should be the same as the URI to the Alias/Directory set above
# Pass all other URLs straight through
RewriteRule ^/(.*)$ http://127.0.0.1:9080/VirtualHostBase/http/%{SERVER_NAME}:80/plumi-devel/VirtualHostRoot/$1 [L,P]
# ^^^^ ^^^^^
# port number Zope is running on ID of plone site when you first created it
# (e.g. http://localhost:8080/plumi - ID is 'plumi')
</VirtualHost>
- make /var/www/flv/flv-prod and /var/www/flv/flv-devel
sudo mkdir /var/www/flv sudo mkdir /var/www/flv/flv-prod sudo mkdir /var/www/flv/flv-devel sudo chgrp -R plone /var/www/flv sudo chmod -R g+w /var/www/flv
- sites ruru-plumi-prod and ruru-plumi-devel enabled, default disabled:
sudo a2ensite ruru-plumi-prod sudo a2ensite ruru-plumi-devel sudo a2dissite default sudo /etc/init.d/apache2/reload
Indytube
Production Instance
indytube.conf (in /opt/plone/prod/plumi-0.2.3-final/indytube) modified to:
[encoder] BE_HOW_NICE=18 CONVERT_THESE=['.avi','.qt','.mov','.mpeg','.mp4','.mpg','.asf','.wmv','.3gp','.ogg','.flv','.m4v','.ogm','.divx'] DO_ENCODING=True NUMBER_OF_PARALLEL_ENCODERS=1 ENCODER_LOCKFILE_BASE=/opt/plone/prod/plumi-0.2.3-final/indytube/indytube-encoder.lock POLLTIME=60 [mencoder] MENCODER_LOCATION=/usr/bin/mencoder # for older versions of MEncoder. #MENCODER_OPTIONS=-really-quiet -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:keyint=50:vbitrate=150:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=320:240 -srate 22050 # for newer versions of MEncoder, we dont need the "lavfopts" line above, plus we add in a higher bitrate, and a sync option MENCODER_OPTIONS=-really-quiet -of lavf -oac mp3lame -lameopts abr:br=64 -ovc lavc -lavcopts codec=flv:keyint=25:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf harddup,expand=:::::4/3,scale=640:480 -srate 22050 -ofps 25 -mc 0/10 [ffmpeg2theora] CORTADO_LOCATION=http://demo.plumi.org/flowplayer/cortado-ovt-debug-0.2.2.jar FFMPEG2THEORA_COMMAND=ffmpeg2theora [flvtool2] FLVTOOL_LOCATION=/usr/bin/flvtool2 [paths] VIDEO_FILE_DIRECTORY=/opt/plone/prod/Plone-2.5.5/zeocluster/client1/var/files/Members FLV_FILE_DIRECTORY=/var/www/flv/flv-prod INCLUDE_FILE_DIRECTORY=/opt/plone/prod/Plone-2.5.5/zeocluster/client1/var/files/Members INCLUDE_FILE_SUFFIX=.flv.inc INCLUDE_TEMPLATE=/opt/plone/prod/plumi-0.2.3-final/indytube/plumi.template [urls] FLOWPLAYER_LOCATION=http://plumi-prod.ruru/flv-prod/FlowPlayer.swf VIDEO_SERVER_URL=http://plumi-prod.ruru/flv-prod/ SPLASH_IMAGE_BASE=http://plumi-prod.ruru/Members/ SPLASH_IMAGE_FILE=indytube.jpg [logging] LOG_FILE=/opt/plone/prod/plumi-0.2.3-final/indytube/plumi-indytube.log LOG_LEVEL=logging.INFO
Development Instance
indytube.conf (in /opt/plone/devel/plumi-0.2.3-final/indytube) modified to:
[encoder] BE_HOW_NICE=18 CONVERT_THESE=['.avi','.qt','.mov','.mpeg','.mp4','.mpg','.asf','.wmv','.3gp','.ogg','.flv','.m4v','.ogm','.divx'] DO_ENCODING=True NUMBER_OF_PARALLEL_ENCODERS=1 ENCODER_LOCKFILE_BASE=/opt/plone/devel/plumi-0.2.3-final/indytube/indytube-encoder.lock POLLTIME=60 [mencoder] MENCODER_LOCATION=/usr/bin/mencoder # for older versions of MEncoder. #MENCODER_OPTIONS=-really-quiet -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:keyint=50:vbitrate=150:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=320:240 -srate 22050 # for newer versions of MEncoder, we dont need the "lavfopts" line above, plus we add in a higher bitrate, and a sync option MENCODER_OPTIONS=-really-quiet -of lavf -oac mp3lame -lameopts abr:br=64 -ovc lavc -lavcopts vcodec=flv:keyint=25:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf harddup,expand=:::::4/3,scale=640:480 -srate 22050 -ofps 25 -mc 0/10 [ffmpeg2theora] CORTADO_LOCATION=http://demo.plumi.org/flowplayer/cortado-ovt-debug-0.2.2.jar FFMPEG2THEORA_COMMAND=ffmpeg2theora [flvtool2] FLVTOOL_LOCATION=/usr/bin/flvtool2 [paths] VIDEO_FILE_DIRECTORY=/opt/plone/devel/Plone-2.5.5/zeocluster/client1/var/files/Members FLV_FILE_DIRECTORY=/var/www/flv/flv-devel INCLUDE_FILE_DIRECTORY=/opt/plone/devel/Plone-2.5.5/zeocluster/client1/var/files/Members INCLUDE_FILE_SUFFIX=.flv.inc INCLUDE_TEMPLATE=/opt/plone/devel/plumi-0.2.3-final/indytube/plumi.template [urls] FLOWPLAYER_LOCATION=http://plumi-devel.ruru/flv-devel/FlowPlayer.swf VIDEO_SERVER_URL=http://plumi-devel.ruru/flv-devel/ SPLASH_IMAGE_BASE=http://plumi-devel.ruru/Members/ SPLASH_IMAGE_FILE=indytube.jpg [logging] LOG_FILE=/opt/plone/devel/plumi-0.2.3-final/indytube/plumi-indytube.log LOG_LEVEL=logging.INFO
Init Scripts
- /etc/init.d/zope created, then 'chmod +x':
#! /bin/sh -e
#### BEGIN INIT INFO
# Provides: zope
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start zope instances
# Description: Debian init script for the starting zope
# instances. Basically just calls
# "zeocluster/bin/{start|shutdown|restart}cluster.sh".
### END INIT INFO
#
# Author: Victor Rajewski
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
STARTCLUSTER=zeocluster/bin/startcluster.sh
STOPCLUSTER=zeocluster/bin/shutdowncluster.sh
RESTARTCLUSTER=zeocluster/bin/restartcluster.sh
# Configuration file for zope instances. Seperate instances by a space
# At miniumum should have:
#
# ZOPE_INSTANCES="/opt/Plone-2.5.5/"
# ZOPE_RUN_AS=plone
#
conf="/etc/default/zope"
# Exit if not found.
test -f "$conf" && . "$conf"
. /lib/lsb/init-functions
for instance in $ZOPE_INSTANCES ; do
cmd="su $ZOPE_RUN_AS -c '$instance'"
RETVAL=0
case "$1" in
start)
log_daemon_msg "Starting: $instance"
echo -n " "
eval $cmd/$STARTCLUSTER
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping: $instance"
echo -n " "
eval $cmd/$STOPCLUSTER
log_end_msg 0
;;
restart)
log_daemon_msg "Restarting: $instance"
echo -n " "
eval $cmd/$RESTARTCLUSTER
log_end_msg 0
;;
*)
echo "Usage: /etc/init.d/zope {start|stop|restart}"
exit 1
;;
esac
done
- /etc/default/zope created:
# Location of zope instances (base folder); seperate by a space if you have more than one # e.g ZOPE_INSTANCES="/foo/bar/zope-dev /foo/bar/zope-production" ZOPE_INSTANCES="/opt/plone/prod/Plone-2.5.5/ /opt/plone/devel/Plone-2.5.5/" ZOPE_USER=plone
- /etc/init.d/indytube created, then 'chmod +x':
#! /bin/sh -e
#### BEGIN INIT INFO
# Provides: indytube
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Controls indytube
# Description: Starts and stops the indytube process
### END INIT INFO
#
# Author: Victor Rajewski
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=indytube.py
LOGFILE=run_indytube.log
PIDFILE=indytube.pid
#
# Configuration file for indytube instances. Seperate instances by a space
# At miniumum should have:
#
# INDY_INSTANCES="/opt/plumi-0.2.3-final/indytube"
# LOCKFILE="indytube-encoder.lock" #must be same as defined in indytube.conf
conf="/etc/default/indytube"
test -f "$conf" && . "$conf"
. /lib/lsb/init-functions
do_start()
{
rm -f $instance/$LOCKFILE
$instance/$DAEMON >$instance/$LOGFILE 2>&1 &
echo $! > $instance/$PIDFILE
log_end_msg 0
}
do_stop()
{
kill -9 `cat $instance/$PIDFILE`
rm $instance/$PIDFILE
log_end_msg 0
}
for instance in $INDY_INSTANCES ; do
RETVAL=0
case "$1" in
start)
log_daemon_msg "Starting: $instance"
do_start
;;
stop)
log_daemon_msg "Stopping: $instance"
do_stop
;;
restart)
log_daemon_msg "Restarting: $instance"
do_stop
sleep 2
do_start
;;
*)
echo "Usage: /etc/init.d/indytube {start|stop|restart}"
exit 1
;;
esac
done
- /etc/default/indytube created:
# Location of indytube instances; seperate by a space if you have more than one # e.g INDY_INSTANCES="/foo/bar/indytube1 /foo/bar/indytube2" INDY_INSTANCES="/opt/plone/prod/plumi-0.2.3-final/indytube /opt/plone/devel/plumi-0.2.3-final/indytube" # This has to be the same as what's defined for ENCODER_LOCKFILE_BASE in indytube.conf. # indytube.conf should be modified so the lockfile is stored in the instance's directory, # so $INDY_INSTANCE/$LOCKFILE is the same path as ENCODER_LOCKFILE_BASE in indytube.conf LOCKFILE="indytube-encoder.lock"
- Create symlinks to /etc/rcX.d:
sudo update-rc.d zope defaults sudo update-rc.d indytube defaults
Backups
ZODB Backups
- created directories:
sudo mkdir /opt/plone/prod/scripts /opt/plone/devel/scripts /backup/zodb sudo mkdir /backup/zodb/prod /backup/zodb/devel
- backup-zope.py and restore-zope.py copied from tebet added to /opt/plone/prod/scripts and /opt/plone/devel/scripts. The first line of both scripts (#!/path/to/python changed to point to /opt/plone/prod/Plone-2.5.5/Python-2.4.4/bin/python2.4 or /opt/plone/devel/Plone-2.5.5/Python-2.4.4/bin/python2.4 respectively)
- a script make-ruru-backup.sh created in /opt/plone/. This contains:
#!/bin/sh cd /opt/plone/prod/scripts ./backup-zope.py /opt/plone/prod/Plone-2.5.5/zeocluster/client1 /opt/plone/prod/Plone-2.5.5/zeocluster/server/var /backup/zodb/prod cd /opt/plone/devel/scripts ./backup-zope.py /opt/plone/devel/Plone-2.5.5/zeocluster/client1 /opt/plone/devel/Plone-2.5.5/zeocluster/server/var /backup/zodb/devel
- chmod +x /opt/plone/make-ruru-backup.sh
Filesystem backups (using backupninja)
- Run ninjahelper, create new backup action type 'sys'
- copy /opt/plone/make-ruru-backup.sh to /etc/backup.d/20.zodb.sh
- create /etc/backup.d/30.system-fs.rdiff
[source] label = ruru-video-archive-system type = local keep = 60 include = /bin include = /boot include = /cdrom include = /etc include = /home include = /initrd include = /initrd.img include = /initrd.img.old include = /lib include = /lib32 include = /lib64 include = /opt include = /root include = /sbin include = /srv include = /usr include = /vmlinuz include = /vmlinuz.old [dest] type = local directory = /backup
- create /etc/backup.d/40.data-fs.rdiff
[source] label = ruru-video-archive-data type = local keep = 60 include = /var [dest] type = local directory = /backup
- create /etc/backup.d/50.rotatezodb.weekly.sh:
# backupninja doesn't seem to do 'when' on .sh, so we set it oursleves
if [ `date +%a` = Wed ]; then
for DIR in prod devel; do
BACKUPDIR=/backup/zodb/$DIR
cd $BACKUPDIR-weekly
rm zodb-$DIR-4.tar.gz
mv zodb-$DIR-3.tar.gz zodb-$DIR-4.tar.gz
mv zodb-$DIR-2.tar.gz zodb-$DIR-3.tar.gz
mv zodb-$DIR-1.tar.gz zodb-$DIR-2.tar.gz
tar czf $BACKUPDIR-weekly/zodb-$DIR-1.tar.gz $BACKUPDIR
rm -rf $BACKUPDIR/*
done
fi
- create /etc/backup.d/51.rotatezodb.monthly.sh
# backupninja doesn't seem to do 'when' on .sh, so we set it oursleves
if [ `date +%d` = 01 ]; then
for DIR in prod devel; do
BACKUPDIR=/backup/zodb/$DIR
MONTH=`date +%b`
cp $BACKUPDIR-weekly/zodb-$DIR-1.tar.gz $BACKUPDIR-monthly/zodb-$DIR-$MONTH.tar.gz
done
fi
- mkdir /backup/zodb/prod/ /backup/zodb/devel/ /backup/zodb/prod-weekly/ /backup/zodb/devel-weekly/ /backup/zodb/prod-monthly/ /backup/zodb/devel-monthly/
- edit /etc/backupninja.conf; change 'when' to 'everyday at 15:00'