Old repo backup, checkout current, lost repo, create new repo?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
I have three svn repos I recently (6 months ago) moved to my private, remote server. Due to life and negligence, I only have one svn hotcopy of two of them made immediately after the move.

A week ago the disk with the three repos failed.

I have current copies of each repo’s trunk (I’m not not using branches) and want to know the best way to get the repos back in place and working again.

I am the only user, and I use the svn+ssh access to the repo completely owned by myself. History is not terribly important.

From what I can find in various docs, I think the easiest way to recover is to copy the 6-month-old hot copy to the original path and resume working from there as usual (plus make sure my backups work in the future!). For the other I will just recreate the repo from scratch.

Given that history will be lost, does anyone see any problems with my recovery plan?

Thanks for any advice.

Best regards,

-Tom


Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Nico Kadel-Garcia-2
On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
>
> I have three svn repos I recently (6 months ago) moved to my private, remote server. Due to life and negligence, I only have one svn hotcopy of two of them made immediately after the move.
>
> A week ago the disk with the three repos failed.
>
> I have current copies of each repo’s trunk (I’m not not using branches) and want to know the best way to get the repos back in place and working again.
>
> I am the only user, and I use the svn+ssh access to the repo completely owned by myself. History is not terribly important.

Sounds like time to simply start new repos with your three projects.
Import the contents of the local working to new trunks, and move on.

> From what I can find in various docs, I think the easiest way to recover is to copy the 6-month-old hot copy to the original path and resume working from there as usual (plus make sure my backups work in the future!). For the other I will just recreate the repo from scratch.
>
> Given that history will be lost, does anyone see any problems with my recovery plan?

If you have working copies and you don't care about history, why are
you spending any cycles on doing anything with hotcopy? You've lost
history anyway, why keep any of it?

> Thanks for any advice.
>
> Best regards,
>
> -Tom
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
...
> > Given that history will be lost, does anyone see any problems with my recovery plan?
...
> If you have working copies and you don't care about history, why are
> you spending any cycles on doing anything with hotcopy? You've lost
> history anyway, why keep any of it?

Cycles aren't important, but the size of the data is. Transferring the
working copy from scratch would take a LONG time, while the bulk of
the data are already there in the hotcopy.

So, again, would my plan work to re-establish my repo and work flow?

Thanks.

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
On Mon, Dec 10, 2018 at 4:55 AM Tom Browder <[hidden email]> wrote:
>
> On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
> ...
> > > Given that history will be lost, does anyone see any problems with my recovery plan?
> ...
> > If you have working copies and you don't care about history, why are
> > you spending any cycles on doing anything with hotcopy? You've lost
> > history anyway, why keep any of it?
...
> So, again, would my plan work to re-establish my repo and work flow?

Ping?  I really need some expert opinion here so I can proceed: is my
plan to replace the lost repos with their hotcopies okay?

Thanks.

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Stefan Sperling
On Mon, Dec 10, 2018 at 03:37:46PM -0600, Tom Browder wrote:

> On Mon, Dec 10, 2018 at 4:55 AM Tom Browder <[hidden email]> wrote:
> >
> > On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> > > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
> > ...
> > > > Given that history will be lost, does anyone see any problems with my recovery plan?
> > ...
> > > If you have working copies and you don't care about history, why are
> > > you spending any cycles on doing anything with hotcopy? You've lost
> > > history anyway, why keep any of it?
> ...
> > So, again, would my plan work to re-establish my repo and work flow?
>
> Ping?  I really need some expert opinion here so I can proceed: is my
> plan to replace the lost repos with their hotcopies okay?
>
> Thanks.
>
> -Tom

Your current working copy will be invalidated if repositories are
back-dated. The SVN client will complain that it cannot find revisions
which are not present in the old hotcopy.

So if you use the old hotcopy, you need to check out a fresh working
copy and then move your current files from your current working copy
over to the fresh working copy, record any tree structure changes with
'svn add', 'svn remove', or 'svn move' as appropriate, and then commit
the result. This giant commit will then contain a combined version of all
the commits you have lost. Then you can continue working with SVN as usual.
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
On Mon, Dec 10, 2018 at 15:56 Stefan Sperling <[hidden email]> wrote:
...

Thank you, Stefan!

Best regards,

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Nico Kadel-Garcia-2
In reply to this post by Tom Browder
On Mon, Dec 10, 2018 at 5:56 AM Tom Browder <[hidden email]> wrote:

>
> On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
> ...
> > > Given that history will be lost, does anyone see any problems with my recovery plan?
> ...
> > If you have working copies and you don't care about history, why are
> > you spending any cycles on doing anything with hotcopy? You've lost
> > history anyway, why keep any of it?
>
> Cycles aren't important, but the size of the data is. Transferring the
> working copy from scratch would take a LONG time, while the bulk of
> the data are already there in the hotcopy.

Under what possible conditions wound importing a single snapshot of
the current working copy, without history, take more time than working
from a hotcopy to overlay the changes on top of that hotcopy?

> So, again, would my plan work to re-establish my repo and work flow?

Yes, any of your solutions could work.

> Thanks.
>
> -Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder


On Mon, Dec 10, 2018 at 19:45 Nico Kadel-Garcia <[hidden email]> wrote:
On Mon, Dec 10, 2018 at 5:56 AM Tom Browder <[hidden email]> wrote:
>
> On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
> ...
> > > Given that history will be lost, does anyone see any problems with my recovery plan?
> ...
> > If you have working copies and you don't care about history, why are
> > you spending any cycles on doing anything with hotcopy? You've lost
> > history anyway, why keep any of it?
>
> Cycles aren't important, but the size of the data is. Transferring the
> working copy from scratch would take a LONG time, while the bulk of
> the data are already there in the hotcopy.

Under what possible conditions wound importing a single snapshot of
the current working copy, without history, take more time than working
from a hotcopy to overlay the changes on top of that hotcopy?

I don’t know, Nico, I am a real novice at this. Your first answer didn’t help because I didn’t know the ramifications of what I was trying to do.

The original data, from just six months ago, was about 27 Gb, which took a very long time to upload from my home computer to my remote server.  Since the only hotcopy, done shortly after the repo was loaded, there has been very little change, so if I could start with the hotcopy and somehow synch my working copy without pushing 27 Gb again, life would be better.

Howver, it sounds like there is no way around a massive upload again :-(

Thanks.

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Nico Kadel-Garcia-2
On Mon, Dec 10, 2018 at 9:10 PM Tom Browder <[hidden email]> wrote:

>
>
>
> On Mon, Dec 10, 2018 at 19:45 Nico Kadel-Garcia <[hidden email]> wrote:
>>
>> On Mon, Dec 10, 2018 at 5:56 AM Tom Browder <[hidden email]> wrote:
>> >
>> > On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
>> > > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
>> > ...
>> > > > Given that history will be lost, does anyone see any problems with my recovery plan?
>> > ...
>> > > If you have working copies and you don't care about history, why are
>> > > you spending any cycles on doing anything with hotcopy? You've lost
>> > > history anyway, why keep any of it?
>> >
>> > Cycles aren't important, but the size of the data is. Transferring the
>> > working copy from scratch would take a LONG time, while the bulk of
>> > the data are already there in the hotcopy.
>>
>> Under what possible conditions wound importing a single snapshot of
>> the current working copy, without history, take more time than working
>> from a hotcopy to overlay the changes on top of that hotcopy?
>
>
> I don’t know, Nico, I am a real novice at this. Your first answer didn’t help because I didn’t know the ramifications of what I was trying to do.
>
> The original data, from just six months ago, was about 27 Gb, which took a very long time to upload from my home computer to my remote server.  Since the only hotcopy, done shortly after the repo was loaded, there has been very little change, so if I could start with the hotcopy and somehow synch my working copy without pushing 27 Gb again, life would be better.

??? An import of the copy of the working data has no history. Is the
*data* 27 GB, with no .svn content, 27 GB ? What in the devil are you
putting in source control?

I'm not objecting to your situation, just really confused by the
content you are dealing with.
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
On Mon, Dec 10, 2018 at 23:15 Nico Kadel-Garcia <[hidden email]> wrote:

>
> On Mon, Dec 10, 2018 at 9:10 PM Tom Browder <[hidden email]> wrote:
> >
> >
> >
> > On Mon, Dec 10, 2018 at 19:45 Nico Kadel-Garcia <[hidden email]> wrote:
> >>
> >> On Mon, Dec 10, 2018 at 5:56 AM Tom Browder <[hidden email]> wrote:
> >> >
> >> > On Mon, Dec 10, 2018 at 12:10 AM Nico Kadel-Garcia <[hidden email]> wrote:
> >> > > On Sun, Dec 9, 2018 at 6:31 PM Tom Browder <[hidden email]> wrote:
> >> > ...
> >> > > > Given that history will be lost, does anyone see any problems with my recovery plan?
> >> > ...
> >> > > If you have working copies and you don't care about history, why are
> >> > > you spending any cycles on doing anything with hotcopy? You've lost
> >> > > history anyway, why keep any of it?
> >> >
> >> > Cycles aren't important, but the size of the data is. Transferring the
> >> > working copy from scratch would take a LONG time, while the bulk of
> >> > the data are already there in the hotcopy.
> >>
> >> Under what possible conditions wound importing a single snapshot of
> >> the current working copy, without history, take more time than working
> >> from a hotcopy to overlay the changes on top of that hotcopy?
> >
> >
> > I don’t know, Nico, I am a real novice at this. Your first answer didn’t help because I didn’t know the ramifications of what I was trying to do.
> >
> > The original data, from just six months ago, was about 27 Gb, which took a very long time to upload from my home computer to my remote server.  Since the only hotcopy, done shortly after the repo was loaded, there has been very little change, so if I could start with the hotcopy and somehow synch my working copy without pushing 27 Gb again, life would be better.
>
> ??? An import of the copy of the working data has no history. Is the
> *data* 27 GB, with no .svn content, 27 GB ? What in the devil are you
> putting in source control?
>
> I'm not objecting to your situation, just really confused by the
> content you are dealing with.


Sorry, Nico, I probably didn’t use the correct terms in my problem
description. Basically the subversion repos on my remote server were
current as of about six months ago when they were established there
and a hotcopy was made.

There have been few updates since, so is the hotcopy of value or not,
history wise?

Anyway, my thought was to save some upload and download time if possible.

UPDATE: Problems in svn-repo land

I copied the two hotcopy backups to the original repo locations, and
my local server has found them (I'm using GUI client SmartSVN on
Windows, command line on Linux).

I started to update on one and am getting these messages (which you
warned me about):

  Clean Up: Failed to run the WC DB work queue associated with
'C:\Users\Tom\Documents\0-mydocs-svn', work item 636 (file-install
Personal/TomB/sto/Misc/llftpar2.exe 1 0 1 1) Can't open file
'C:\Users\Tom\Documents\0-mydocs-svn\.svn\pristine\7e\7eddb1479c338c0a0fb4a08e21e2b81a8d6c1b61.
svn-base': The system cannot find the file specified.

FWIW, the repos are on my remote Linux server I have full control
over--running Debian 9.

(Note the working copy is on Windows, and I do not have a wc of it on
my local Linux host.)

Is there anything I can do to fix something like that?  Or do I have
to go through creating new repos and populating them from he original
repo files and dirs?

Thanks so much.

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Stefan Sperling
On Thu, Dec 13, 2018 at 07:18:23AM -0600, Tom Browder wrote:
> Sorry, Nico, I probably didn’t use the correct terms in my problem
> description. Basically the subversion repos on my remote server were
> current as of about six months ago when they were established there
> and a hotcopy was made.

You should reconsider your backup strategy.

The biggest concern is that backups should be created immediately after
a change has been committed, and that your backup should preferrably go to
a different physical machine. Use the post-commit hook to trigger a backup
(and the post-revprop-change hook, too, if your repository is configured
to allow revprop changes).

As for getting a copy of repository data, there are a number of options.

The fastest and smallest backup is provided by:
  svnadmin hotcopy --incremental /var/svn/repo /data/backup/repo
It is safe to run this command in a post-commit hook.
But a local mount point for the destination is required. Incremental hotcopy
relies on file sizes and last-modified timestamps recorded in the filesystems
of source and destination.
If the destination is a network drive, make sure clocks between machine stay
in sync. No harm will be done when the clocks are out of sync, but it can
take a lot more time if timestamps don't match since data might be copied
redundantly.

If you need to backup a repository across a network connection, then
take a look at 'svnsync' (requires a second SVN server) and 'svnrdump'
(backup requires read-access over network, backup can be restored
locally with 'svnadmin load').

There is also 'svnadmin freeze' which is intended for use with an
underlying filesystem which supports snapshots (e.g. ZFS). You can
freeze the repository while a snapshot is created, and then copy
data from that snapshot however you want.

> There have been few updates since, so is the hotcopy of value or not,
> history wise?

Only you can decide whether the history of your data is valuable to you.
 
> I started to update on one and am getting these messages (which you
> warned me about):
>
>   Clean Up: Failed to run the WC DB work queue associated with
> 'C:\Users\Tom\Documents\0-mydocs-svn', work item 636 (file-install
> Personal/TomB/sto/Misc/llftpar2.exe 1 0 1 1) Can't open file
> 'C:\Users\Tom\Documents\0-mydocs-svn\.svn\pristine\7e\7eddb1479c338c0a0fb4a08e21e2b81a8d6c1b61.
> svn-base': The system cannot find the file specified.

This error means the working copy is corrupt. This error has nothing to do
with the repository. The working copy's work queue contains instructions to
copy a temporary file into the area where you see the files you work with.
One possible reason is that an operation (probably an update) was interrupted
in a bad way, i.e. not by a 'Cancel' button but because SVN crashed.
Another possibility is that you moved this working copy between machines
and somehow lost the temporary files in that process.

Generally, SVN's design considers working copies as disposable
because they can always be checked out again, Your resistence to
transferring your data again is working against that design assumption.

> Is there anything I can do to fix something like that?  Or do I have
> to go through creating new repos and populating them from he original
> repo files and dirs?

I'll note that you still haven't fixed your problem which we first
heard about last Sunday. Would it take you more than a week to transfer
the data? Maybe you should just do something that allows you to move on,
instead of waiting until you find a potentially perfect solution?
Reply | Threaded
Open this post in threaded view
|

Re: Old repo backup, checkout current, lost repo, create new repo?

Tom Browder
On Fri, Dec 14, 2018 at 5:26 AM Stefan Sperling <[hidden email]> wrote:
> On Thu, Dec 13, 2018 at 07:18:23AM -0600, Tom Browder wrote:
...
> > description. Basically the subversion repos on my remote server were
> > current as of about six months ago when they were established there
> > and a hotcopy was made.
>
> You should reconsider your backup strategy.
...
> a different physical machine. Use the post-commit hook to trigger a backup
> (and the post-revprop-change hook, too, if your repository is configured
> to allow revprop changes).
...

I was in the process of setting that up and got distracted (old age :-).

> Only you can decide whether the history of your data is valuable to you.

True.

> > I started to update on one and am getting these messages (which you
> >   Clean Up: Failed to run the WC DB work queue associated with
> > 'C:\Users\Tom\Documents\0-mydocs-svn', work item 636 (file-install
...
> This error means the working copy is corrupt. This error has nothing to do
> with the repository. The working copy's work queue contains instructions to
> copy a temporary file into the area where you see the files you work with.
,,,
> Generally, SVN's design considers working copies as disposable
> because they can always be checked out again, Your resistence to
> transferring your data again is working against that design assumption.

I'm guilty as charged!

> > Is there anything I can do to fix something like that?  Or do I have
...
> heard about last Sunday. Would it take you more than a week to transfer
> the data? Maybe you should just do something that allows you to move on,
> instead of waiting until you find a potentially perfect solution?

Yes, I made some bad decisions.

Many thanks, Stefan!

-Tom