Re: [BackupPC-users] save backuppc backups on a ultrium tape
Hi, i...@newoffice.it wrote on 2013-11-18 16:04:25 +0100 [Re: [BackupPC-users] save backuppc backups on a ultrium tape]: [...] i've found this script this would have been a good place to mention where you found it. [...] DATADIR=/var/lib/backuppc/pc BackupPCDATADIR=/dev/st0 This doesn't make sense with respect to the usage of these variables below. DATADIR would seem to be meant to point to some temporary space available for this script to put large amounts of data into (tars of the last backup of all hosts). BackupPCDATADIR would seem to be meant to be $TopDir/pc - in the case of Debian and Ubuntu package installs /var/lib/backuppc/pc (what DATADIR is erroneously set to). # Uncomment to remove old backups #echo Removing old backups. #find $DATADIR/ -type f | while read foo; do # rm -fv $foo #done Err, well, yes, with the correct settings of the variables. As it is here, it would remove all BackupPC backups - not likely something you actually want to do. echo Checking dump directories. ls $BackupPCDATADIR | grep -v archive | while read foo; do mkdir $DATADIR/$foo 2/dev/null chmod 777 $DATADIR/$foo 2/dev/null I read chmod 777 as I don't know what I'm doing, but something didn't work, and now it apparently does for whatever reasons. done ls $BackupPCDATADIR | grep -v archive | while read host; do echo Dumping $host `date` Ah, we're at eight dots now. Five seemed plenty. $BackupPCBIN/BackupPC_tarCreate -t -h $host -n -1 -s \* . $DATADIR/$host/$host.`date +%Y%m%W`.tar This is the one interesting line. It would seem to be correct, though your naming preferences may vary. In particular, %W won't be very descriptive if you run this more than once a week ;-). pbzip2 -p7 $DATADIR/$host/$host.`date +%Y%m%W`.tar pbzip2 is an interesting idea. Thank you for that. You should probably adapt the '-p7' switch to what suits your system, though. There may or may not be reasons for creating an intermediate copy of the tar file instead of just piping directly into pbzip2. Again, you should see what fits your system rather than copying what fitted someone else's. echo Done! `date` done exit 0 All in all, my coding style preferences differ, but it would seem to work (correct variable settings assumed!). What it gives you is compressed tar archives of the last backup of each host in a directory somewhere (or rather a directory of directories). Nothing is written to tape anywhere, though you might just need to put it somewhere your tape system is configured to pick it up. No synchronization though (unless this is *called* by the tape system as a pre-backup command). No logic to decide whether any backup has actually completed since the last call (i.e. if you disable backups for a host, this script will continue creating a tar of the same last backup of this host; if a host wasn't reachable today, you'll just get a new copy of yesterday's backup). Hope that helps. Regards, Holger -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On 11/15/2013 04:46 PM, Les Mikesell wrote: On Fri, Nov 15, 2013 at 8:38 AM, i...@newoffice.it i...@newoffice.it wrote: i must to put all the backuppc backups on a tape , i think that i can use something like tar -cvpzf /dev/st0 /var/lib/backuppc +cronjob It is generally not practical to copy the whole archive directory with file-oriented methods like tar. There is no efficient way to reconstruct the millions of hardlinks in the filesystem and it will take a very long time to complete. is there something better? like some bacuppc feature ( so i can have a mail if the job fails) One thing that would work would be to use the command line tool Backuppc_tarCreate to generate tar images of the latest backup from each host that you can write to tape. You don't get the whole history on a single tape that way, but you do gain the ability to restore directly with tar without needing to reconstruct backuppc for the job. Backuppc has a concept called 'archive' hosts that you can set up to make tar images for you through the web interface but it is probably better to just write your own script around Backuppc_tarCreate so you can schedule it with cron. hi i've found this script ## # BackupPC Archive Script # Brian Smith - Bonnier Corporation ## #!/bin/bash DATADIR=/var/lib/backuppc/pc BackupPCDATADIR=/dev/st0 BackupPCBIN=/usr/share/backuppc/bin # Uncomment to remove old backups #echo Removing old backups. #find $DATADIR/ -type f | while read foo; do # rm -fv $foo #done echo Checking dump directories. ls $BackupPCDATADIR | grep -v archive | while read foo; do mkdir $DATADIR/$foo 2/dev/null chmod 777 $DATADIR/$foo 2/dev/null done ls $BackupPCDATADIR | grep -v archive | while read host; do echo Dumping $host `date` $BackupPCBIN/BackupPC_tarCreate -t -h $host -n -1 -s \* . $DATADIR/$host/$host.`date +%Y%m%W`.tar pbzip2 -p7 $DATADIR/$host/$host.`date +%Y%m%W`.tar echo Done! `date` done exit 0 https://forums.zmanda.com/showthread.php?1823-Archive-to-Tape it seems doing exactly what i need... do you think it could be ok? tnx AbsyntH -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On 11/15/2013 09:52 PM, Arnold Krille wrote: On Fri, 15 Nov 2013 11:17:07 -0600 Les Mikesell lesmikes...@gmail.com wrote: On Fri, Nov 15, 2013 at 9:45 AM, i...@newoffice.it i...@newoffice.it wrote: On 11/15/2013 03:38 PM, i...@newoffice.it wrote: Or simply can i put /dev/st0 to # The path on the local file system where archives will be written: $Conf{ArchiveDest} = That would be part of an 'archivehost' setup. It may work but you'd have to start the run from the web page and you can probably get better performance from your tape drive if you pipe the output of Backuppc_tarCreate through dd with some appropriate block size. Or if you have extra disk space, write intermediate tar files to some holding space so you have a better chance of keeping the tape streaming. We do exactly that: Trigger an archive-host to dump encrypted tars of the last backup of all (or selected) machines into a dir. This archive-host has a pre-script that mount the dump-dir via nfs (because backuppc runs on its own virtual machine and the streamer isn't yet virtualized). In the post-script the dir is unmounted and on the streamer-machine amanda is started to dump the tars to tape in an orderly fashion. Using amanda and not just dd to dump the tars has the advantage that you get an index of your tape-contents and can restore single tars from the middle of the tape. We do have another type of archive-host that mounts an iscsi-device, writes encrypted tars of all machines and unmounts the iscsi again... Probably we should publish these script some time. Probably together with the Chef-recipes to configure backuppc and its clients. Have fun, Arnold hi Arnold can you publish your own scripts so we can fill a gap of backuppc about the bailouts on tape ? tnx AbsyntH -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] save backuppc backups on a ultrium tape
Hi, i'm a noob backuppc's user so if there are some faqs or howtos that explain my problem you can simply link them and i'll read it... my question is: i must to put all the backuppc backups on a tape , i think that i can use something like tar -cvpzf /dev/st0 /var/lib/backuppc +cronjob is there something better? like some bacuppc feature ( so i can have a mail if the job fails) thank you AbsyntH -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On 11/15/2013 03:38 PM, i...@newoffice.it wrote: Hi, i'm a noob backuppc's user so if there are some faqs or howtos that explain my problem you can simply link them and i'll read it... my question is: i must to put all the backuppc backups on a tape , i think that i can use something like tar -cvpzf /dev/st0 /var/lib/backuppc +cronjob is there something better? like some bacuppc feature ( so i can have a mail if the job fails) thank you AbsyntH -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ Or simply can i put /dev/st0 to # The path on the local file system where archives will be written: $Conf{ArchiveDest} = -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On Fri, Nov 15, 2013 at 8:38 AM, i...@newoffice.it i...@newoffice.it wrote: i must to put all the backuppc backups on a tape , i think that i can use something like tar -cvpzf /dev/st0 /var/lib/backuppc +cronjob It is generally not practical to copy the whole archive directory with file-oriented methods like tar. There is no efficient way to reconstruct the millions of hardlinks in the filesystem and it will take a very long time to complete. is there something better? like some bacuppc feature ( so i can have a mail if the job fails) One thing that would work would be to use the command line tool Backuppc_tarCreate to generate tar images of the latest backup from each host that you can write to tape. You don't get the whole history on a single tape that way, but you do gain the ability to restore directly with tar without needing to reconstruct backuppc for the job. Backuppc has a concept called 'archive' hosts that you can set up to make tar images for you through the web interface but it is probably better to just write your own script around Backuppc_tarCreate so you can schedule it with cron. -- Les Mikesell lesmikes...@gmail.com -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On Fri, Nov 15, 2013 at 9:45 AM, i...@newoffice.it i...@newoffice.it wrote: On 11/15/2013 03:38 PM, i...@newoffice.it wrote: Or simply can i put /dev/st0 to # The path on the local file system where archives will be written: $Conf{ArchiveDest} = That would be part of an 'archivehost' setup. It may work but you'd have to start the run from the web page and you can probably get better performance from your tape drive if you pipe the output of Backuppc_tarCreate through dd with some appropriate block size. Or if you have extra disk space, write intermediate tar files to some holding space so you have a better chance of keeping the tape streaming. -- Les Mikesell lesmikes...@gmail.com -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On Fri, 15 Nov 2013 11:17:07 -0600 Les Mikesell lesmikes...@gmail.com wrote: On Fri, Nov 15, 2013 at 9:45 AM, i...@newoffice.it i...@newoffice.it wrote: On 11/15/2013 03:38 PM, i...@newoffice.it wrote: Or simply can i put /dev/st0 to # The path on the local file system where archives will be written: $Conf{ArchiveDest} = That would be part of an 'archivehost' setup. It may work but you'd have to start the run from the web page and you can probably get better performance from your tape drive if you pipe the output of Backuppc_tarCreate through dd with some appropriate block size. Or if you have extra disk space, write intermediate tar files to some holding space so you have a better chance of keeping the tape streaming. We do exactly that: Trigger an archive-host to dump encrypted tars of the last backup of all (or selected) machines into a dir. This archive-host has a pre-script that mount the dump-dir via nfs (because backuppc runs on its own virtual machine and the streamer isn't yet virtualized). In the post-script the dir is unmounted and on the streamer-machine amanda is started to dump the tars to tape in an orderly fashion. Using amanda and not just dd to dump the tars has the advantage that you get an index of your tape-contents and can restore single tars from the middle of the tape. We do have another type of archive-host that mounts an iscsi-device, writes encrypted tars of all machines and unmounts the iscsi again... Probably we should publish these script some time. Probably together with the Chef-recipes to configure backuppc and its clients. Have fun, Arnold signature.asc Description: PGP signature -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] save backuppc backups on a ultrium tape
On Fri, Nov 15, 2013 at 2:52 PM, Arnold Krille arn...@arnoldarts.de wrote: Using amanda and not just dd to dump the tars has the advantage that you get an index of your tape-contents and can restore single tars from the middle of the tape. Amanda is able to dynamically re-order a mix of full/incremental runs to fit the tape and may need several tapes to complete a restore so that index is important. For a static set of fulls (or filled from backuppc) you could just write them in a fixed sequence to the no-rewind device and use 'mt fsf' to position to the on you want to restore. If you aren't used to writing tapes, you do need to make sure that the blocking on the writes matches what tar expects on the restore (usually 10k or multiples). Amanda takes care of that for you under the covers too. -- Les Mikesell lesmikes...@gmail.com -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/