Hi All,
I solved my problem after discovering the "import repository" feature of
SCM Manager.
Steps:
1. Mount the network drive on the new computer running a fresh instance
of SCM Manager
2. Start up SCM Manager and point it to the network drive as the
location to keep its repositories.
3. Click on "import repositories"->Select Git/Subversion-> "Import from
directory"
4. SCM Manager then finds the repositories and imports them, together
with all the branches, commit history etc.
The only thing needed after this is to re-create the users and edit each
repository individually to add an owner and other users to it. That is
tedious, but I can live with it :)
Regarding Chuck's approach
(dunno what /var/lib/scm contains.. I am running SCM Manager under its
own user, from the tarball downloaded from the website, and all the SCM
Manager data is in $HOME/.scm. I'm assuming /var/lib/scm contains the
same thing as $HOME/.scm)
It seems to me that there are two parts of the SCM Manager data. 1. The
repositories themselves and their content and 2. Other meta-data like
the users and which repositories they have access to. Both need to be
backed up! In my case, I had backups of 1. but not 2.
Chuck: Your script looks good, but what added benefit do you see of
turning /var/lib/scm into a repository itself? (Apart from seeing what
changed?) The original script should be perfectly fine for restoring in
case your SCM Manager machine goes down.
Regards,
Sagar
On 08/21/2015 03:20 PM, Chuck Boecking wrote:
> This is a great question and an unfortunately situation. The purpose of
> this post is to help make sure you do not get in this situation in the
> future. Will the group please confirm the below will work? The below
> assumes you are using linux. Here are my thoughts:
>
> 1. FYI - Here is a post on how to backup your SCM repos offsite
> <
https://groups.google.com/forum/#!searchin/scmmanager/backup$20chuck/scmmanager/bYgTHCWLE9w/Xknaj3LpKr0J>
>
> 2. If you were to create a repository out of the /var/lib/scm/
> directory and add it to your scmManager, you would effectively be
> backing up your scm instance to scm itself.
> 3. If you were to modify the above backup script to also regularly
> commit and push your /var/lib/scm/ directory, then you would have an
> offsite backup of your scm installation.
> 4. In the event of disaster recovery, you would [a] install scm on the
> new server, [b] recover your /var/lib/scm/ from your offsite backup.
>
> The questions are:
>
> * Is there anything else you need to backup from the local machine