Commit 4e39c676 authored by Enrico Zini's avatar Enrico Zini
Browse files

Moved etch packages in etch branch

parents
2007-08-31 Christopher R. Gabriel <cgabriel@truelite.it>
* fuss-backup (BD): added OCTOFUSS database backup if present.
Criteri per i pattern di esclusione dei file dai backup
=======================================================
.mp3
Perchè gli MP3 no?
fuss-backup for Debian
----------------------
Piccolo paccheto per un sistema di backup generalizzato, su disco, adatto ad un Fuss Server
-- Christopher R. Gabriel <cgabriel@fuss.bz.it>, Thu, 12 Jan 2006 10:03:43 +0100
fuss-backup (2.0-1) feisty; urgency=low
* Fork to etch
* Porting to Debian Etch, with OCTOFUSS database backup
-- Christopher R. Gabriel <cgabriel@truelite.it> Fri, 31 Aug 2007 10:06:00 +0200
fuss-backup (0.1-6) soledad; urgency=low
* Patch da Piero Cemin <pcemin@fuss.bz.it> per creazione directory principale di backup,
se mancante, e correzioni sul patch del file di esclusione.
-- Christopher R. Gabriel <cgabriel@fuss.bz.it> Mon, 5 Jun 2006 22:18:23 +0200
fuss-backup (0.1-5) unstable; urgency=low
* Controllo per le home su NFS dei client.
-- Christopher Gabriel <cgabriel@fuss.bz.it> Wed, 8 Feb 2006 12:33:43 +0100
fuss-backup (0.1-4) unstable; urgency=low
* Rimossa dipendenza dal slapd, controllo direttamente nello script, per
poter utilizzare lo script sui client.
-- Christopher Gabriel <cgabriel@fuss.bz.it> Wed, 8 Feb 2006 12:09:44 +0100
fuss-backup (0.1-3) unstable; urgency=low
* Timestamp al minuto
-- Christopher Gabriel <cgabriel@fuss.bz.it> Wed, 8 Feb 2006 11:58:08 +0100
fuss-backup (0.1-2) unstable; urgency=low
* Nuovo script che corregge un possibile errore al primo run
-- Christopher Gabriel <cgabriel@fuss.bz.it> Wed, 8 Feb 2006 11:44:03 +0100
fuss-backup (0.1-1) unstable; urgency=low
* Initial Release.
-- Christopher R. Gabriel <cgabriel@fuss.bz.it> Thu, 12 Jan 2006 10:03:43 +0100
Source: fuss-backup
Section: base
Priority: optional
Maintainer: Christopher R. Gabriel <cgabriel@truelite.it>
Build-Depends: debhelper (>= 4.0.0)
Standards-Version: 3.6.1
Package: fuss-backup
Architecture: any
Depends: tar, coreutils
Description: FUSS Server backup script
Shell script with a backup procedura for a FUSS Server.
http://www.fuss.bz.it/
This package was debianized by Christopher R. Gabriel <cgabriel@fuss.bz.it> on
Thu, 12 Jan 2006 10:03:43 +0100.
It was downloaded from http://devel.fuss.bz.it/
Copyright Holder: <put author(s) name and email here>
License:
<Put the license of the package here>
usr/bin
usr/sbin
README
README.exclude
AUTHORS
fuss-backup_0.1-4_i386.deb unknown optional
# crontab per fuss-backup
# lo standard è il lunedi mattino alle 13:15 di ogni settimana.
#
# Decommentare per ricevere una copia dell'output del backup
#MAILTO="root,backup@fuss.bz.it"
15 13 * * 1 root fuss-backup
fuss-backup /usr/sbin/
fuss-backup.conf /etc/fuss-backup/
fuss-backup.exclude /etc/fuss-backup/
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install
dh_installcron
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
#!/bin/sh
#
#
#
if [ -f /etc/fuss-backup/fuss-backup.conf ]; then
. /etc/fuss-backup/fuss-backup.conf
else
echo "Errore: file di configurazione non presente"
exit 1
fi
#
if [ $START != "yes" ]; then
echo "ERRORE: e' necessario configurare l'applicazione fuss-backup"
echo "per avviarne l'esecuzione!"
echo "Modificare il file /etc/fuss-backup/fuss-backup.conf"
exit 2
fi
# data e ora correnti
DATE=`date "+%Y%m%d-%H%M"`
# creo, se non esiste, la directory principale di backup
if [ ! -d $BACKUP_DIR ]; then
mkdir $BACKUP_DIR
fi
# creo
# creo una directory ad hoc per contenere tutti i backup
BD=$BACKUP_DIR/fuss-backup-$DATE
mkdir $BD
# definizione dei programmi da utilizzare nello script
# se esiste il file di esclusione, utilizzarlo
if [ -f /etc/fuss-backup/fuss-backup.exclude ]; then
echo "E' attivo un file di esclusione"
TAR="/bin/tar --exclude-from=/etc/fuss-backup/fuss-backup.exclude"
else
echo "Non e' stato utilizzato il file di esclusione"
TAR=/bin/tar
fi
### LDAP ###
# controlla se e' installato LDAP, se si fai il backup
if [ -f /etc/init.d/slapd ]; then
# leggo dati da ldap, interrompendo il servizio Q.B.
/etc/init.d/slapd stop
slapcat | gzip > $BD/backup-ldap-$DATE.ldif.gz
/etc/init.d/slapd start
fi
### LISTA SOFTWARE INSTALLATO ###
# leggo la lista del software installato SUL SERVER e la salvo
dpkg --get-selections | gzip > $BD/lista-sw-$HOSTNAME-$HOSTNAME-$DATE.txt.gz
### BACKUP DI HOME ###
# fare backup di /home se non siamo su di un
# client NFS
if touch /home/.test-fuss-backup ; then
HOMES="/home $HOME"
else
HOMES="$HOME"
fi
$TAR -zcf $BD/backup-home-$DATE.tar.gz $HOMES
### BACKUP DEL DATABASE DI OCTOFUSS, SE PRESENTE
if [ -d /var/lib/octofuss/ ]; then
$TAR -zcf $BD/backup-octofuss-$DATE.tar.gz /var/lib/octofuss/
fi
### BACKUP DI ETC ###
$TAR -zcf $BD/backup-etc-$DATE.tar.gz /etc
### BACKUP DI /VAR/LOG ###
$TAR -zcf $BD/backup-var-log-$DATE.tar.gz /var/log/
### BACKUP DI ALTRE CARTELLE AGGIUNTIVE ###
# eseguo il backup della cartelle aggiuntive
# solo se specificate nel file di configurazione
if [ "$ALTRE_DIR" ]; then
$TAR -zcf $BD/backup-altro-$DATE.tar.gz $ALTRE_DIR
fi
### IL BACKUP VIENE SPEZZATO SE RICHIESTO ###
## da spezzare anche gli altri oltre a home!!! ###
if [ "$SPLIT" ]; then
cd $BD
split -d -b $SPLIT backup-home-$DATE.tar.gz backup-home-$DATE.tar.gz.
rm backup-home-$DATE.tar.gz
fi
## STORICO ##
# manteniamo $STORICO backup vecchi
if [ $STORICO -ge 0 ]; then
STORICO=`expr $STORICO + 1`
cd $BACKUP_DIR
TOTALE=`ls -d fuss-backup-* | wc -l`
DAELIMINARE=`expr $TOTALE - $STORICO`
if [ $DAELIMINARE -gt 0 ]; then
for i in `ls -d fuss-backup-* | head -$DAELIMINARE`; do
echo "Elimino il backup $i"
rm -rf $i
done
fi
fi
#
# File di configurazione generale per fuss-backup
#
# utilizzare START=yes per avviare la procedura di backup
START=no
# dove salvare i dati di backup
BACKUP_DIR=/var/backups
# le altre directory di cui fare backup
ALTRE_DIR="/var/www"
# se spezzare il backup alla dimensione richiesta
SPLIT=
# quanti dei backup vecchi manteniamo nella directory
# dei backup?
STORICO=1
\ No newline at end of file
*.mp3
*.avi
*.iso
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment