Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Piping data on Windows command prompt

I need to get a backup dump of a large (~8gb) svn repository. My current method involves using svnadmin dump to a file and then using 7-Zip to compress and split the file.

> svnadmin dump c:\path\to\myrepo > c:\svndump.svn
> 7z svndump.svn svndump.7z      // or whatever the correct syntax is

I was wondering if there would be a way to skip the middle-man here, and get the svn dump data to be compressed in one go by using pipes or something? Is this possible? What would the syntax be?

like image 393
nickf Avatar asked Apr 30 '09 07:04

nickf


1 Answers

svnadmin dump dumps to standard out by default and the 7z command line can read from standard input using the -si switch.

svnadmin dump c:\path\to\myrepo | 7z a -si svndump.7z
like image 155
Dave Webb Avatar answered Sep 21 '22 11:09

Dave Webb