BackupPC-users

Re: [BackupPC-users] Error BackupPC_tarCreate

2013-04-12 11:44:09
Subject: Re: [BackupPC-users] Error BackupPC_tarCreate
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 12 Apr 2013 10:43:00 -0500
On Fri, Apr 12, 2013 at 8:17 AM, Nicolas Cauchie
<nicolas AT franceoxygene DOT fr> wrote:
>
>
> I tried this command :
>  /usr/share/backuppc/bin/BackupPC_tarCreate -t -h test-host -s '*' -n -1 / 
> >/home/test-host.tar
>
> It works perfectly. ;)
>
> In fact, I want to make what BackupPC GUI does (Start archive>Select all (in 
> my case)>Archive selected hosts). I read that it must be done by an 
> executable script with cron.
>
> So, your command makes a tar, then I must compress it with bzip2. Is there a 
> way to compress it "on the fly" ?
>
> I ran the last command and I put "| bzip2 -v myfile.tar", at the end of the 
> command, but it doesn't work, it makes me a file sizes 14o...
>
> So, is there a way to make what BackupPC GUI does, automatically ? Cron job 
> or anything else ?

Yes, but this isn't really a backuppc question - you just need to know
a little more about what the shell does.  Many unix/linux tools read
data from their standard input and write to standard output, and the
shell allows you to easily redirect/combine them.
prog1 >/path/to/file
will send the output to the specified file.
prog1 | prog2
sends the output of prog1 to the input of prog2 with the output of
prog2 going to your current output, probably the screen.
prog1 | prog2 >/path/to/file
sends the final output to a single file.
The 'split' program is something of a special case that might or might
not be useful for you.   You can give it a size, prefix and number of
suffix characters and it will write the output into some number of
smaller files with names that sort correctly in alphabetical order.
The complementary functionality comes from the fact that the shell
sorts wildcard filename expansion alphabetically and 'cat' will read a
list of files and send their contents to stdout.

--
   Les Mikesell
     lesmikesell AT gmail DOT com

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>