Promoting a mirror repository as a source repository
Hello again, I have a (now theoretical) question : Suppose I have a repository that is a mirror repository of a remote source repository, regularly synced using svnsync. Suppose now that the source repository become broken or deleted for any reason (server breakdown, fire, etc) So the only available copy of the repository is now the synced mirror repository. How could I promote my mirror repository in order to have it becoming the new source repository on the mirror server or on another server ? (I think that just using the mirror repository without change is not enough as it contains somewhere inside it information about the old source repository, given at the beginning by "svnsync initialize", which would certainly need to be removed) Gingko
Re: Promoting a mirror repository as a source repository
Greetings, Gingko! > I have a (now theoretical) question : > Suppose I have a repository that is a mirror repository of a remote source > repository, regularly synced using svnsync. > Suppose now that the source repository become broken or deleted for any > reason (server breakdown, fire, etc) > So the only available copy of the repository is now the synced mirror > repository. > How could I promote my mirror repository in order to have it becoming the > new source repository on the mirror server or on another server ? > (I think that just using the mirror repository without change is not enough > as it contains somewhere inside it information about the old source > repository, given at the beginning by "svnsync initialize", which would > certainly need to be removed) svn help switch http://svnbook.org/ -- WBR, Andrey Repin (anrdae...@freemail.ru) 06.11.2010, <3:29> Sorry for my terrible english...
Re: Promoting a mirror repository as a source repository
- Original Message - From: "Andrey Repin" To: "Gingko" ; Sent: Saturday, November 06, 2010 1:30 AM Subject: Re: Promoting a mirror repository as a source repository Greetings, Gingko! I have a (now theoretical) question : Suppose I have a repository that is a mirror repository of a remote source repository, regularly synced using svnsync. Suppose now that the source repository become broken or deleted for any reason (server breakdown, fire, etc) So the only available copy of the repository is now the synced mirror repository. How could I promote my mirror repository in order to have it becoming the new source repository on the mirror server or on another server ? (I think that just using the mirror repository without change is not enough as it contains somewhere inside it information about the old source repository, given at the beginning by "svnsync initialize", which would certainly need to be removed) svn help switch http://svnbook.org/ Thank you very much for your answer, but I'm sorry, this is not an answer to my question. "svn switch" is about changing URLs in working copies, I know how to do this (actually I made several of these changes today). But what I want to know is what I have to do on the REPOSITORY side. Gingko
RE: Promoting a mirror repository as a source repository
This is doable (I've done it). The shadow repository needs to have the same UUID as the source, and you either have to repoint the DNS at it or svn switch all existing clients. See Andrey's link for the skinny. Tony. -Original Message- From: Gingko [mailto:from_tig...@nospam.homelinux.org] Sent: 05 November 2010 23:50 To: Subversion User List Subject: Promoting a mirror repository as a source repository Hello again, I have a (now theoretical) question : Suppose I have a repository that is a mirror repository of a remote source repository, regularly synced using svnsync. Suppose now that the source repository become broken or deleted for any reason (server breakdown, fire, etc) So the only available copy of the repository is now the synced mirror repository. How could I promote my mirror repository in order to have it becoming the new source repository on the mirror server or on another server ? (I think that just using the mirror repository without change is not enough as it contains somewhere inside it information about the old source repository, given at the beginning by "svnsync initialize", which would certainly need to be removed) Gingko __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
RE: Promoting a mirror repository as a source repository
Plus, you need to set a number of properties on the zeroeth revision of the target repository (if I recall correctly) and add a hook script for the sync user to be allowed to modify revision commit text in order for svnsync to run successfully. (And delete the revo #0 properties when you're done, though I don't think that was essential). Look in the red bean book at svnsync. Tony. -Original Message- From: Gingko [mailto:from_tig...@nospam.homelinux.org] Sent: 06 November 2010 01:02 To: Subversion User List Subject: Re: Promoting a mirror repository as a source repository - Original Message - From: "Andrey Repin" To: "Gingko" ; Sent: Saturday, November 06, 2010 1:30 AM Subject: Re: Promoting a mirror repository as a source repository > Greetings, Gingko! > >> I have a (now theoretical) question : > >> Suppose I have a repository that is a mirror repository of a remote >> source >> repository, regularly synced using svnsync. > >> Suppose now that the source repository become broken or deleted for any >> reason (server breakdown, fire, etc) >> So the only available copy of the repository is now the synced mirror >> repository. > >> How could I promote my mirror repository in order to have it becoming the >> new source repository on the mirror server or on another server ? > >> (I think that just using the mirror repository without change is not >> enough >> as it contains somewhere inside it information about the old source >> repository, given at the beginning by "svnsync initialize", which would >> certainly need to be removed) > > svn help switch > http://svnbook.org/ Thank you very much for your answer, but I'm sorry, this is not an answer to my question. "svn switch" is about changing URLs in working copies, I know how to do this (actually I made several of these changes today). But what I want to know is what I have to do on the REPOSITORY side. Gingko __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Re: Promoting a mirror repository as a source repository
Greetings, Gingko! >>> I have a (now theoretical) question : >> >>> Suppose I have a repository that is a mirror repository of a remote >>> source >>> repository, regularly synced using svnsync. >> >>> Suppose now that the source repository become broken or deleted for any >>> reason (server breakdown, fire, etc) >>> So the only available copy of the repository is now the synced mirror >>> repository. >> >>> How could I promote my mirror repository in order to have it becoming the >>> new source repository on the mirror server or on another server ? >> >>> (I think that just using the mirror repository without change is not >>> enough >>> as it contains somewhere inside it information about the old source >>> repository, given at the beginning by "svnsync initialize", which would >>> certainly need to be removed) >> >> svn help switch >> http://svnbook.org/ > Thank you very much for your answer, but I'm sorry, this is not an answer to > my question. > "svn switch" is about changing URLs in working copies, I know how to do this > (actually I made several of these changes today). I gave you both answers. If you are too lazy to pick them, sorry, it's not my problem. > But what I want to know is what I have to do on the REPOSITORY side. Most generalized answer: nothing. Details depends on your exact setup. -- WBR, Andrey Repin (anrdae...@freemail.ru) 06.11.2010, <19:54> Sorry for my terrible english...
RE: Promoting a mirror repository as a source repository
> Linedata Limited Registered Office: 85 Gracechurch St., London, EC3V 0AA Registered in England and Wales No 3475006 VAT Reg No 710 3140 03 -Original Message- > From: Gingko [mailto:from_tig...@nospam.homelinux.org] > Sent: 05 November 2010 23:50 > To: Subversion User List > Subject: Promoting a mirror repository as a source repository > > Hello again, > > I have a (now theoretical) question : > > Suppose I have a repository that is a mirror repository of a > remote source repository, regularly synced using svnsync. > > Suppose now that the source repository become broken or > deleted for any reason (server breakdown, fire, etc) So the > only available copy of the repository is now the synced > mirror repository. > > How could I promote my mirror repository in order to have it > becoming the new source repository on the mirror server or on > another server ? > > (I think that just using the mirror repository without change > is not enough as it contains somewhere inside it information > about the old source repository, given at the beginning by > "svnsync initialize", which would certainly need to be removed) Hi, We use svnsync to keep our DR repositories ready, and the procedure I have to switch to these repositories is something like the following (for each repository): - delete the svn:sync-* revision property for revision 0 - modify the hooks and/or access file to allow read-write access for all normal users - change the DNS for the URL of the production server to point to the DR server Hope this helps Giulio
RE: Promoting a mirror repository as a source repository
Sounds great, but I have the notion that the UUID must be identical for the two repositories for this to work, how do you achieve that? Is this done by svnsync? Or isn't this necessary at all? Geir Note : All inquiries regarding Subversion, MKS and general Development servers should be directed to "EDB SourceControl System" -Original Message- From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] Sent: 8. november 2010 10:14 To: 'Gingko'; 'Subversion User List' Subject: RE: Promoting a mirror repository as a source repository > Linedata Limited Registered Office: 85 Gracechurch St., London, EC3V 0AA Registered in England and Wales No 3475006 VAT Reg No 710 3140 03 -Original Message- > From: Gingko [mailto:from_tig...@nospam.homelinux.org] > Sent: 05 November 2010 23:50 > To: Subversion User List > Subject: Promoting a mirror repository as a source repository > > Hello again, > > I have a (now theoretical) question : > > Suppose I have a repository that is a mirror repository of a > remote source repository, regularly synced using svnsync. > > Suppose now that the source repository become broken or > deleted for any reason (server breakdown, fire, etc) So the > only available copy of the repository is now the synced > mirror repository. > > How could I promote my mirror repository in order to have it > becoming the new source repository on the mirror server or on > another server ? > > (I think that just using the mirror repository without change > is not enough as it contains somewhere inside it information > about the old source repository, given at the beginning by > "svnsync initialize", which would certainly need to be removed) Hi, We use svnsync to keep our DR repositories ready, and the procedure I have to switch to these repositories is something like the following (for each repository): - delete the svn:sync-* revision property for revision 0 - modify the hooks and/or access file to allow read-write access for all normal users - change the DNS for the URL of the production server to point to the DR server Hope this helps Giulio
RE: Promoting a mirror repository as a source repository
> -Original Message- > From: Engebakken Geir [mailto:geir.engebak...@edb.com] > Sent: 08 November 2010 11:08 > To: Giulio Troccoli; 'Gingko'; 'Subversion User List' > Subject: RE: Promoting a mirror repository as a source repository > > Sounds great, but I have the notion that the UUID must be > identical for the two repositories for this to work, how do > you achieve that? Is this done by svnsync? Or isn't this > necessary at all? > Please do not top-post. My reply at the bottom. > > Geir > > Note : All inquiries regarding Subversion, MKS and general > Development servers should be directed to "EDB SourceControl System" > > > -Original Message- > From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] > Sent: 8. november 2010 10:14 > To: 'Gingko'; 'Subversion User List' > Subject: RE: Promoting a mirror repository as a source repository > > > > > > Linedata Limited > Registered Office: 85 Gracechurch St., London, EC3V 0AA > Registered in England and Wales No 3475006 VAT Reg No 710 3140 03 > > -Original Message----- > > > > From: Gingko [mailto:from_tig...@nospam.homelinux.org] > > Sent: 05 November 2010 23:50 > > To: Subversion User List > > Subject: Promoting a mirror repository as a source repository > > > > Hello again, > > > > I have a (now theoretical) question : > > > > Suppose I have a repository that is a mirror repository of a remote > > source repository, regularly synced using svnsync. > > > > Suppose now that the source repository become broken or deleted for > > any reason (server breakdown, fire, etc) So the only > available copy of > > the repository is now the synced mirror repository. > > > > How could I promote my mirror repository in order to have > it becoming > > the new source repository on the mirror server or on > another server ? > > > > (I think that just using the mirror repository without > change is not > > enough as it contains somewhere inside it information about the old > > source repository, given at the beginning by "svnsync initialize", > > which would certainly need to be removed) > > Hi, > > We use svnsync to keep our DR repositories ready, and the > procedure I have to switch to these repositories is something > like the following (for each repository): > > - delete the svn:sync-* revision property for revision 0 > - modify the hooks and/or access file to allow read-write > access for all normal users > - change the DNS for the URL of the production server to > point to the DR server > > Hope this helps > > Giulio That's true, the UUID must be identical. Svnsync does not do that. I did it when I set up the repository, before even issuing the svnsync init. I just grabbed the UUID from the production repository, then create the DR repository, set it's UUID as the same as the production repository, issue svnsync init and start synchronising.
RE: Promoting a mirror repository as a source repository
> -Original Message- > From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] > Sent: 8. november 2010 12:13 > To: Engebakken Geir; 'Gingko'; 'Subversion User List' > Subject: RE: Promoting a mirror repository as a source repository > > > -Original Message- > > From: Engebakken Geir [mailto:geir.engebak...@edb.com] > > Sent: 08 November 2010 11:08 > > To: Giulio Troccoli; 'Gingko'; 'Subversion User List' > > Subject: RE: Promoting a mirror repository as a source repository > > > > Sounds great, but I have the notion that the UUID must be > > identical for the two repositories for this to work, how do > > you achieve that? Is this done by svnsync? Or isn't this > > necessary at all? > > > > Please do not top-post. My reply at the bottom. > > > > > Geir > > > > Note : All inquiries regarding Subversion, MKS and general > > Development servers should be directed to "EDB SourceControl System" > > > > > > -Original Message----- > > From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] > > Sent: 8. november 2010 10:14 > > To: 'Gingko'; 'Subversion User List' > > Subject: RE: Promoting a mirror repository as a source repository > > > > > > > > > > > Linedata Limited > > Registered Office: 85 Gracechurch St., London, EC3V 0AA > > Registered in England and Wales No 3475006 VAT Reg No 710 3140 03 > > > > -Original Message- > > > > > > > From: Gingko [mailto:from_tig...@nospam.homelinux.org] > > > Sent: 05 November 2010 23:50 > > > To: Subversion User List > > > Subject: Promoting a mirror repository as a source repository > > > > > > Hello again, > > > > > > I have a (now theoretical) question : > > > > > > Suppose I have a repository that is a mirror repository of a remote > > > source repository, regularly synced using svnsync. > > > > > > Suppose now that the source repository become broken or deleted for > > > any reason (server breakdown, fire, etc) So the only > > available copy of > > > the repository is now the synced mirror repository. > > > > > > How could I promote my mirror repository in order to have > > it becoming > > > the new source repository on the mirror server or on > > another server ? > > > > > > (I think that just using the mirror repository without > > change is not > > > enough as it contains somewhere inside it information about the old > > > source repository, given at the beginning by "svnsync initialize", > > > which would certainly need to be removed) > > > > Hi, > > > > We use svnsync to keep our DR repositories ready, and the > > procedure I have to switch to these repositories is something > > like the following (for each repository): > > > > - delete the svn:sync-* revision property for revision 0 > > - modify the hooks and/or access file to allow read-write > > access for all normal users > > - change the DNS for the URL of the production server to > > point to the DR server > > > > Hope this helps > > > > Giulio > > That's true, the UUID must be identical. Svnsync does not do that. I > did it when I set up the repository, before even issuing the svnsync > init. I just grabbed the UUID from the production repository, then > create the DR repository, set it's UUID as the same as the production > repository, issue svnsync init and start synchronising. FYI Just found out that from Svn 1.5 on, one can use this command to set the uuid, so that makes it possible to easily switch to a synced repository: svnadmin setuuid
RE: Promoting a mirror repository as a source repository
> Linedata Limited Registered Office: 85 Gracechurch St., London, EC3V 0AA Registered in England and Wales No 3475006 VAT Reg No 710 3140 03 -Original Message- > From: Engebakken Geir [mailto:geir.engebak...@edb.com] > Sent: 08 November 2010 15:41 > To: Giulio Troccoli; 'Gingko'; 'Subversion User List' > Subject: RE: Promoting a mirror repository as a source repository > > > -Original Message- > > From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] > > Sent: 8. november 2010 12:13 > > To: Engebakken Geir; 'Gingko'; 'Subversion User List' > > Subject: RE: Promoting a mirror repository as a source repository > > > > > -Original Message- > > > From: Engebakken Geir [mailto:geir.engebak...@edb.com] > > > Sent: 08 November 2010 11:08 > > > To: Giulio Troccoli; 'Gingko'; 'Subversion User List' > > > Subject: RE: Promoting a mirror repository as a source repository > > > > > > Sounds great, but I have the notion that the UUID must be > identical > > > for the two repositories for this to work, how do you > achieve that? > > > Is this done by svnsync? Or isn't this necessary at all? > > > > > > > Please do not top-post. My reply at the bottom. > > > > > > > > Geir > > > > > > Note : All inquiries regarding Subversion, MKS and general > > > Development servers should be directed to "EDB > SourceControl System" > > > > > > > > > -Original Message- > > > From: Giulio Troccoli [mailto:giulio.trocc...@uk.linedata.com] > > > Sent: 8. november 2010 10:14 > > > To: 'Gingko'; 'Subversion User List' > > > Subject: RE: Promoting a mirror repository as a source repository > > > > > > > > > > > > > > > > Linedata Limited > > > Registered Office: 85 Gracechurch St., London, EC3V 0AA > Registered > > > in England and Wales No 3475006 VAT Reg No 710 3140 03 > > > > > > -Original Message- > > > > > > > > > > From: Gingko [mailto:from_tig...@nospam.homelinux.org] > > > > Sent: 05 November 2010 23:50 > > > > To: Subversion User List > > > > Subject: Promoting a mirror repository as a source repository > > > > > > > > Hello again, > > > > > > > > I have a (now theoretical) question : > > > > > > > > Suppose I have a repository that is a mirror repository of a > > > > remote source repository, regularly synced using svnsync. > > > > > > > > Suppose now that the source repository become broken or deleted > > > > for any reason (server breakdown, fire, etc) So the only > > > available copy of > > > > the repository is now the synced mirror repository. > > > > > > > > How could I promote my mirror repository in order to have > > > it becoming > > > > the new source repository on the mirror server or on > > > another server ? > > > > > > > > (I think that just using the mirror repository without > > > change is not > > > > enough as it contains somewhere inside it information about the > > > > old source repository, given at the beginning by "svnsync > > > > initialize", which would certainly need to be removed) > > > > > > Hi, > > > > > > We use svnsync to keep our DR repositories ready, and the > procedure > > > I have to switch to these repositories is something like the > > > following (for each repository): > > > > > > - delete the svn:sync-* revision property for revision 0 > > > - modify the hooks and/or access file to allow read-write > access for > > > all normal users > > > - change the DNS for the URL of the production server to point to > > > the DR server > > > > > > Hope this helps > > > > > > Giulio > > > > That's true, the UUID must be identical. Svnsync does not > do that. I > > did it when I set up the repository, before even issuing > the svnsync > > init. I just grabbed the UUID from the production repository, then > > create the DR repository, set it's UUID as the same as the > production > > repository, issue svnsync init and start synchronising. > > FYI > > Just found out that from Svn 1.5 on, one can use this > command to set the uuid, so that makes it possible to easily > switch to a synced repository: > > svnadmin setuuid That's exactly what I use :-)