I believe you could potentially have an inconsistent tar archive if the backuppc service is running while you are generating your archive. The safest method would be to use LVM volumes on your backup server, and then just create an LVM snapshot and back up the snapshot so you won't need to shut down backuppc.

Dan-

max wrote:

Hi all,

below my approach used on a backuppc server, for the second copy of archive in a iPod via usb (but you can use a more big and fast usb hard disk)

My test-server run with debian/sarge with 2.6.10 or 2.6.12 kernel + udev , on a raid SW Linear with 2x40 GB HD for the data and a 6 GB HD for the system.

the raid is mounted in /mnt/md0 and contain the backuppc archive folder:
# /etc/init.d/backuppc stop
# mv /var/lib/backuppc /mnt/md0
# ln -s /mnt/md0/backuppc /var/lib/
# mkdir /mnt/md0/copias
# /etc/init.d/backuppc start

now a little script controlled by crontab at 4pm in order to create tar achives of all pc,s achived in /mnt/md0/copias

put this script in /etc/backuppc/archive-generator.sh
---------------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/bash
# Archive-Generator.sh by MaX

VIA=/usr/share/backuppc/bin
# Creating the list of pc,s
cat /etc/backuppc/hosts | grep -v "#" | cut -d ' ' -f1 | grep -v archive > /tmp/pclist
chmod 600 /tmp/pclist

rm /mnt/md0/copias/*  # delete the olds tarArchives

# Creating the .gz of each pc archive in the usb storage device
for PC in `cat /tmp/pclist`; do
   cd /mnt/md0/backuppc/pc/$PC
LAST=`find . -type d -maxdepth 1 | grep -v new | tr -d '.' | tr -d '/' | tail -n1` su -c "$VIA/BackupPC_archiveHost $VIA/BackupPC_tarCreate /usr/bin/split /usr/bin/par2 $PC $LAST /bin/gzip .gz 0 /mnt/md0/copias 0 \"*\"" backuppc
done
rm /tmp/pclist

--------------------------------------------------------------------------------------------------------------------------------------------------------- this is added to root's crontab, but you can modify it, to run as backuppc user, changing su -c "$VIA/BackupPC_archiveHost $VIA/BackupPC_tarCreate /usr/bin/split /usr/bin/par2 $PC $LAST /bin/gzip .gz 0 /mnt/md0/copias 0 \"*\"" backuppc
with
$VIA/BackupPC_archiveHost $VIA/BackupPC_tarCreate /usr/bin/split /usr/bin/par2 $PC $LAST /bin/gzip .gz 0 /mnt/md0/copias 0 "*"


Add to root's crontab this record:
# crontab -e
0 16 * * * /etc/backuppc/archive-generator.sh

this record will start archive-generator.sh all days at 4 pm.
Obviously if you want a fresh tararchive before this hour, you can use the Backuppc interface via browser.

Now you can share (if you want) /mnt/md0/copias via samba, so you can burn form another
machine the tarArchives generated, in some dvd or tape.

...but i prefer to use my iPod with an automatic copy :-) because my backuppc server lack of monitor and keyboard.

iPod
install usbmount
# apt-get install usbmount

modify /etc/usbmount/usbmount.conf
FYLESYSTEMS="hfsplus vfat ext3"
(my iPod use hfsplus as filesystem)

add this script in: /etc/usbmount/mount.d/01_backuppc

--------------------------------------------------------------------------
#!/bin/bash
POINT=$UM_MOUNTPOINT/BackupPC_0
TODAY=`date +%Y-%m-%d`
rm  $POINT/*
cp /mnt/md0/copias/*.gz $POINT
touch $POINT/$TODAY
# Eject the usb storage device (iPod)
eject $UM_MOUNTPOINT
--------------------------------------------------------------------------

finish!

if you connect a iPod (via usb2 Highspeed) or other usb HD, for example at 18 pm, all tarArchive will be copied in the iPod and umounted. When in the ipod screen, appear the usual "do not disconnect" message this mean that the copy is running. When in the ipod screen, appear the standard menu list, this mean that the copy is completed and you can disconnect the iPod and go to home.

Note: i've tried to create the tarArchives directly in the iPod when is connected, but this generate a lot of bus errors due a kernel bug not yet solved in the usb_storage. I prefer create the tarArchives in background at 4 pm because USB2 is not so fast as declared, and i can have only 3 MB/s of transfer rate in my iPod connected via usb2 high speed. I think that with a good usb HD you can have better performances, than my little iPod. With firewire connection i've registered 5 MB/s in the same iPod but i haven't yet found a working method to automount a firewire link and run a script.

Any suggestions are welcome


best,
MaX


______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to