You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bo Berglund <bo...@gmail.com> on 2019/04/07 15:11:49 UTC

My server crashed during update, how to handle svn repositories on new installation?

I have an Ubuntu Server 16.04.2 LTS that is running Apache Subversion
1.9.7 (r1800392). Total size of repositories is 5.5 GB. It was
installed a year ago approximately.
This server is acting as a backup to the main repository using
svnsync.

Today I was going to upgrade the Ubuntu server to version 18.04.2 as
suggested when I logged in to the server (using SSH). So I was going
to use the week-end to upgrade.

But it went south on me, the do-release-upgrade process chugged along
until it suddenly disappeared from my monitor. Turns out something
went really bad with the upgrade, but all data files seem to be OK.
Except when booting the server goes into PANIC mode.

So I figured I would have to extract the disk data to an USB disk or
similar, before installing Ubuntu Server 16.04.2LTS from scratch
again.
In the console which I can reach using an earlier kernel I can tar up
the SVN repositories, so if I can just move them out of the PC as tgz
files I would be OK.

Once that has been done and Ubuntu is reinstalled I need to attach the
files from the original disk to the svn server. How would that be best
done?

If I extract the archives into /var/lib/svn would svn be OK with the
files then?
Does it do some magic like marking the files in any way that will make
the sync from the main server fail?
Or is the ID of a repository stored in some of the files inside the
repo database?
The svnsync function relies in some way on the repository ID,
right....


-- 
Bo Berglund
Developer in Sweden


Re: My server crashed during update, how to handle svn repositories on new installation?

Posted by Bo Berglund <bo...@gmail.com>.
On Sun, 7 Apr 2019 18:10:45 -0400, Mark Phippard <ma...@gmail.com>
wrote:

>> Where are the svn configurations saved such that I can apply these as
>> well when I eventually re-install subversion?
>> Basically, what settings do I need to find and back up so I can
>> restore the exact same server after Ubuntu has been re-installed?
>
>There is no absolute answer because it is possible to store them anywhere, 
>but if you are talking about Apache configuration, the standard location 
>would be in /etc/httpd

OK, I have already tar-ed up the entire /etc dir, so any file there
would be contained in the tar file. :-)


-- 
Bo Berglund
Developer in Sweden


Re: My server crashed during update, how to handle svn repositories on new installation?

Posted by Mark Phippard <ma...@gmail.com>.
> On Apr 7, 2019, at 4:27 PM, Bo Berglund <bo...@gmail.com> wrote:
> 
> On Sun, 7 Apr 2019 11:27:19 -0400, Mark Phippard <ma...@gmail.com>
> wrote:
> 
>> If you have a tar or other backup you ought to be fine once they are restored. 
>> You just need to make sure the permissions on the files are set properly once 
>> you restore. For example, you do not want them owned by root or something.  
>> So just chown -R the whole thing to the user:group that you run your svnsync 
>> process as and you should be fine.
> 
> Thanks,
> I have just done the tar-ing of the different repositories in
> /var/lib/svn. There are 11 of them. When I tar the directories doesn't
> then the Linux permissions also get copied into the tar file?
> I use
> sudo tar -czf svn_reponame.tgz /var/lib/svn/reponame
> to do this from a rescue terminal on the not quite dead server.
> Then I have copied these tgz files over to a USB thumb drive too.
> They are a total of 5.4 GB in size.
> 
> Where are the svn configurations saved such that I can apply these as
> well when I eventually re-install subversion?
> Basically, what settings do I need to find and back up so I can
> restore the exact same server after Ubuntu has been re-installed?

There is no absolute answer because it is possible to store them anywhere, but if you are talking about Apache configuration, the standard location would be in /etc/httpd

Mark

Re: My server crashed during update, how to handle svn repositories on new installation?

Posted by Bo Berglund <bo...@gmail.com>.
On Sun, 7 Apr 2019 11:27:19 -0400, Mark Phippard <ma...@gmail.com>
wrote:

>If you have a tar or other backup you ought to be fine once they are restored. 
>You just need to make sure the permissions on the files are set properly once 
>you restore. For example, you do not want them owned by root or something.  
>So just chown -R the whole thing to the user:group that you run your svnsync 
>process as and you should be fine.

Thanks,
I have just done the tar-ing of the different repositories in
/var/lib/svn. There are 11 of them. When I tar the directories doesn't
then the Linux permissions also get copied into the tar file?
I use
sudo tar -czf svn_reponame.tgz /var/lib/svn/reponame
to do this from a rescue terminal on the not quite dead server.
Then I have copied these tgz files over to a USB thumb drive too.
They are a total of 5.4 GB in size.

Where are the svn configurations saved such that I can apply these as
well when I eventually re-install subversion?
Basically, what settings do I need to find and back up so I can
restore the exact same server after Ubuntu has been re-installed?

I am not really used to Linux, the settings for different programs
seem to be stored in such diverse places....


-- 
Bo Berglund
Developer in Sweden


Re: My server crashed during update, how to handle svn repositories on new installation?

Posted by Mark Phippard <ma...@gmail.com>.
If you have a tar or other backup you ought to be fine once they are restored. You just need to make sure the permissions on the files are set properly once you restore. For example, you do not want them owned by root or something.  So just chown -R the whole thing to the user:group that you run your svnsync process as and you should be fine.

Mark


> On Apr 7, 2019, at 11:11 AM, Bo Berglund <bo...@gmail.com> wrote:
> 
> I have an Ubuntu Server 16.04.2 LTS that is running Apache Subversion
> 1.9.7 (r1800392). Total size of repositories is 5.5 GB. It was
> installed a year ago approximately.
> This server is acting as a backup to the main repository using
> svnsync.
> 
> Today I was going to upgrade the Ubuntu server to version 18.04.2 as
> suggested when I logged in to the server (using SSH). So I was going
> to use the week-end to upgrade.
> 
> But it went south on me, the do-release-upgrade process chugged along
> until it suddenly disappeared from my monitor. Turns out something
> went really bad with the upgrade, but all data files seem to be OK.
> Except when booting the server goes into PANIC mode.
> 
> So I figured I would have to extract the disk data to an USB disk or
> similar, before installing Ubuntu Server 16.04.2LTS from scratch
> again.
> In the console which I can reach using an earlier kernel I can tar up
> the SVN repositories, so if I can just move them out of the PC as tgz
> files I would be OK.
> 
> Once that has been done and Ubuntu is reinstalled I need to attach the
> files from the original disk to the svn server. How would that be best
> done?
> 
> If I extract the archives into /var/lib/svn would svn be OK with the
> files then?
> Does it do some magic like marking the files in any way that will make
> the sync from the main server fail?
> Or is the ID of a repository stored in some of the files inside the
> repo database?
> The svnsync function relies in some way on the repository ID,
> right....
> 
> 
> -- 
> Bo Berglund
> Developer in Sweden
> 

Re: My server crashed during update, how to handle svn repositories on new installation?

Posted by Bo Berglund <bo...@gmail.com>.
On Sun, 07 Apr 2019 17:11:49 +0200, Bo Berglund
<bo...@gmail.com> wrote:

>I have an Ubuntu Server 16.04.2 LTS that is running Apache Subversion
>1.9.7 (r1800392). Total size of repositories is 5.5 GB.
>
>Today I was going to upgrade the Ubuntu server to version 18.04.2 as
>suggested when I logged in to the server (using SSH).
>
>But it went south on me, the do-release-upgrade process chugged along
>until it suddenly disappeared from my monitor. Turns out something
>went really bad with the upgrade, but all data files seem to be OK.
>Except when booting the server goes into PANIC mode.

I have now solved the problem as described in this document:
https://www.ostechnix.com/how-to-fix-broken-ubuntu-os-without-reinstalling-it/

I used an Ubuntu Server 16.04.6 DVD to reach the install console where
I could select Repair...
Reinstalled the GRUB loader and then used the command shell to do the
commands described in the document above. Apparently apt believed it
was on 18.04 already so all fixes and repairs were done towards the
upgraded verson.

At the end when I exited the shell and commanded a system reboot all
went well and now I have a working 18.04.2 system with all the special
setups I had done still working!

So I am happy!


-- 
Bo Berglund
Developer in Sweden