Howdy,

I'm afraid I haven't had a chance to test this with tarsnap, but typically the 
way to do this is with mkfifo, which creates a named pipe (a FIFO: First In 
First Out). An example from memory:

$ mkfifo mysqldump.sql
$ mysqldump mydb  > db.sql &
$ tarsnap -cf myarchive db.sql

Tarsnap should read the output of mysqldump and store it as db.sql. The db.sql 
named pipe on disk doesn't contain the data from mysqldump; if you try to read 
it again it will hang waiting for input from another process.

Hope that helps!

Daniel


> On Jan 3, 2015, at 9:27 AM, Philipp Riegger <[email protected]> wrote:
> 
> Hi,
> 
> I am looking for a backup solution for mysql databases and subversion
> repositories. I think it would be more interesting to backup the dumps
> from "svnadmin dump" and the corresponding mysql command.
> 
> Saving the dumps each time wastes a lot of disk space (and produces a
> lot of unnecessary disk IO). Is there a way to save streams (or data
> from stdin)? Since data from stdin has no timestamp and no user/group
> information, maybe there is a way to create a fake tar file from stdin
> and pipe that to tarsnap? I did some searching on the internet and read
> the man page. This does not seem to be possible at the moment. Is that
> correct?
> 
> Thanks,
>    Philipp

Reply via email to