Ruslan Sivak wrote:
Shad L. Lords wrote:
I'm trying to back up our svn repositories, and I found a nice little backup command line bzip's the backup and creates the md5 hash all in one:

svnadmin dump --deltas /repo |bzip2 |tee dump.bz2 | md5sum >dump.md5

The problem is I need to split the backups, so this doesn't really work. Is there perhaps another way of piping things to allow for splitting of the backups? Currently I'm doing something like this

svnadmin dump --deltas /repo |bzip2 |split - -b 64m
cat *.bz2* | md5sum >dump.md5

Is there a way to do this all in one step?

What about:

svnadmin dump --deltas /repo | bzip2 | tee >(split -b 64m - dump.bz2.) | md5sum > dump.md5

-Shad
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Sorry to resurrect an old thread, but even though this works fine from the command line, it doesn't seem to work from my perl script. I get
sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `svnadmin dump --deltas /svn/russ 2>>/backup/russ/2007/12/full.4.log | bzip2 | tee >(split -b 1888m - /backup/russ/2007/12/full.4.bz2.) | md5sum > /backup/russ/2007/12/full.4.md5'


Looks like it's running sh instead of bash? Is there a way to change the shell that executes the command? I'm using backticks to execute the command in perl.

Russ


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to