You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Clements <gm...@kennel17.co.uk> on 2007/04/27 00:59:31 UTC
Safe to backup if failed svnadmin verify?
I have setup a nightly backup script to do hotcopy and a dump of my
repository.
I also have a script that runs svnadmin verify and sends me an e-mail if
there is a problem.
My question: Is it safe to run the backup if 'verify' failed? Old backups
are kept, so there is no issue about bad backups overwriting good ones, just
whether I could further damage the repo.
I guess a secondary question is whether there is any point - i.e. will the
backup succeed, and will the backups be usable (aside from the damaged
revisions, obviously).
- Mark Clements
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Safe to backup if failed svnadmin verify?
Posted by Mark Clements <gm...@kennel17.co.uk>.
"Johnathan Gifford" <jg...@wernervas.com> wrote in message
news:4631C48E.158F.00BE.0@wernervas.com...
>> * Running "svnadmin hotcopy" or "svnadmin dump" on a repository that
failed
>> "svnadmin verify" will not cause any damage to the repository, or modify
it
>> in any way.
>
> Correct
>
>> * "svnadmin hotcopy" will succeed, and the resulting backup will be an
exact
>> copy of the repo, including the errors.
>
> Yes
>
>> * "svnadmin dump" will fail when it hits the bad revision (resulting in,
>> what? an incomplete dump file, no dump file, a full dump with bad
revisions
>> omitted or full dump which is corrupt/unusable?)
>
> If you are iterating over the repository and dumpingt each revision
> incrementally, only that revision will fail. If you are dump the entire
> repository from revision 1 to X then the dump will fail when it encounters
> the bad revision. If you dump from revision X (loosing all history of
course),
> this will not fail unless X is the corrupt revision.
>
> I don not think you can get an incomplete dump or a full dump with bad
revisions.
OK - just tested this last point, by creating a repo with 5 revisions (0 to
4) and corrupting rev 2. The dump file terminates after outputting the
revision properties, but before outputting any actual data from that
revision.
Basically, what happens is that, when the error occurs, an error message
goes to stderr and the dump process terminates, so whatever is written up to
that point is retained. As you say, an incremental or partial dump that
doesn't include any bad revisions will work fine.
Thanks for all your help,
- Mark Clements
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Safe to backup if failed svnadmin verify?
Posted by Johnathan Gifford <jg...@wernervas.com>.
> * Running "svnadmin hotcopy" or "svnadmin dump" on a repository that failed
> "svnadmin verify" will not cause any damage to the repository, or modify it
> in any way.
Correct
> * "svnadmin hotcopy" will succeed, and the resulting backup will be an exact
> copy of the repo, including the errors.
Yes
> * "svnadmin dump" will fail when it hits the bad revision (resulting in,
> what? an incomplete dump file, no dump file, a full dump with bad revisions
> omitted or full dump which is corrupt/unusable?)
If you are iterating over the repository and dumpingt each revision incrementally, only that revision will fail. If you are dump the entire repository from revision 1 to X then the dump will fail when it encounters the bad revision. If you dump from revision X (loosing all history of course), this will not fail unless X is the corrupt revision.
I don not think you can get an incomplete dump or a full dump with bad revisions.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Safe to backup if failed svnadmin verify?
Posted by Mark Clements <gm...@kennel17.co.uk>.
So to clarify (and correct me if I'm wrong)
* Running "svnadmin hotcopy" or "svnadmin dump" on a repository that failed
"svnadmin verify" will not cause any damage to the repository, or modify it
in any way.
* "svnadmin hotcopy" will succeed, and the resulting backup will be an exact
copy of the repo, including the errors.
* "svnadmin dump" will fail when it hits the bad revision (resulting in,
what? an incomplete dump file, no dump file, a full dump with bad revisions
omitted or full dump which is corrupt/unusable?)
There is still some usefulness in backing up a damaged repository. For
example if it suffers further corruption before it gets fixed a less
corrupted backup is better than no backup. Also, if it is old revisions
that are broken we can restore them from the old backups without losing the
newest revisions that were backed up in the most recent (corrupt) version.
- Mark Clements
"Johnathan Gifford" <jg...@wernervas.com> wrote in message
news:4631B251.158F.00BE.0@wernervas.com...
No and Yes. It's not practical continue the backup if the verify failed.
But if your backup is not overwriting a previous backup, you could continue,
but your backup will not be complete if your dumping the repository. If you
running the hot backup script. It'll do the job, but you still have the bad
revision or revision(s) and your verify will still fail.
When we discovered we had about ten bad revisions, our repo was still
working and functioning correctly until we got those revisions fixed by
CollabNet and dump and reloaded the repository with the correct revisions.
By the way, our repo was corrupted due to a hardware issue and not
Subversion/Apache.
Johnathan
>>> On Thu, Apr 26, 2007 at 7:59 PM, in message
<f0...@sea.gmane.org>,
"Mark Clements" <gm...@kennel17.co.uk> wrote:
> I have setup a nightly backup script to do hotcopy and a dump of my
> repository.
>
> I also have a script that runs svnadmin verify and sends me an e- mail if
> there is a problem.
>
> My question: Is it safe to run the backup if 'verify' failed? Old backups
> are kept, so there is no issue about bad backups overwriting good ones,
just
> whether I could further damage the repo.
>
> I guess a secondary question is whether there is any point - i.e. will
the
> backup succeed, and will the backups be usable (aside from the damaged
> revisions, obviously).
>
> - Mark Clements
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e- mail: users- unsubscribe@subversion.tigris.org
> For additional commands, e- mail: users- help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Safe to backup if failed svnadmin verify?
Posted by Johnathan Gifford <jg...@wernervas.com>.
No and Yes. It's not practical continue the backup if the verify failed. But if your backup is not overwriting a previous backup, you could continue, but your backup will not be complete if your dumping the repository. If you running the hot backup script. It'll do the job, but you still have the bad revision or revision(s) and your verify will still fail.
When we discovered we had about ten bad revisions, our repo was still working and functioning correctly until we got those revisions fixed by CollabNet and dump and reloaded the repository with the correct revisions. By the way, our repo was corrupted due to a hardware issue and not Subversion/Apache.
Johnathan
>>> On Thu, Apr 26, 2007 at 7:59 PM, in message <f0...@sea.gmane.org>,
"Mark Clements" <gm...@kennel17.co.uk> wrote:
> I have setup a nightly backup script to do hotcopy and a dump of my
> repository.
>
> I also have a script that runs svnadmin verify and sends me an e- mail if
> there is a problem.
>
> My question: Is it safe to run the backup if 'verify' failed? Old backups
> are kept, so there is no issue about bad backups overwriting good ones, just
> whether I could further damage the repo.
>
> I guess a secondary question is whether there is any point - i.e. will the
> backup succeed, and will the backups be usable (aside from the damaged
> revisions, obviously).
>
> - Mark Clements
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e- mail: users- unsubscribe@subversion.tigris.org
> For additional commands, e- mail: users- help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org