Wednesday, November 30, 2011

svn dump stderr output causing false positives

We were getting these annoying alerts every time the svn backup was running. Reason was 'svn dump' by default sends feedback like the below to the stderr:
* Dumped revision 0.
* Dumped revision 1.
* Dumped revision 2.
...

From the help command the reason and the workaround came clear:
# svnadmin dump --help
dump: usage: svnadmin dump REPOS_PATH [-r LOWER[:UPPER] [--incremental]]

Dump the contents of filesystem to stdout in a 'dumpfile'
portable format, sending feedback to stderr.  Dump revisions
LOWER rev through UPPER rev.  If no revisions are given, dump all
revision trees.  If only LOWER is given, dump that one revision tree.
If --incremental is passed, the first revision dumped will describe
only the paths changed in that revision; otherwise it will describe
every path present in the repository as of that revision.  (In either
case, the second and subsequent revisions, if any, describe only paths
changed in those revisions.)

Valid options:
  -r [--revision] ARG      : specify revision number ARG (or X:Y range)
  --incremental            : dump incrementally
  --deltas                 : use deltas in dump output
  -q [--quiet]             : no progress (only errors) to stderr

Just using the --quiet option does the trick:
svnadmin dump -q $MASTER_REPO >  $dump_file_path/dumpfile

No comments:

Followers