Discussion:
Migrate CVSNT => SVN on Windows, then move to Linux?
Bo Berglund
2017-12-05 11:42:22 UTC
Permalink
I need to migrate a CVSNT server repository to SVN.
The CVSNT cvs executable needs to be used in the cvs2svn script in
order to handle the CVSNT specific peculiarities. So I need to do the
first step of migration on Windows.

The CVS repository is now about 8 GB in size and some version files
(the ,v files) are huge since they hold a large number of revisions of
binary files. Some are 500 Mbytes in size...

When done then I want to move SVN to Linux in order to get away from
the Windows problems.
So once I have the SVN repository, how can I move it over to Linux?
Is there some preferred method?
--
Bo Berglund
Developer in Sweden
Branko Čibej
2017-12-05 13:07:52 UTC
Permalink
Post by Bo Berglund
I need to migrate a CVSNT server repository to SVN.
The CVSNT cvs executable needs to be used in the cvs2svn script in
order to handle the CVSNT specific peculiarities. So I need to do the
first step of migration on Windows.
The CVS repository is now about 8 GB in size and some version files
(the ,v files) are huge since they hold a large number of revisions of
binary files. Some are 500 Mbytes in size...
When done then I want to move SVN to Linux in order to get away from
the Windows problems.
So once I have the SVN repository, how can I move it over to Linux?
Is there some preferred method?
If your repository isn't being used, just (recursively) copy the
repository directory. The storage format and configuration files are
platform-independent, but of course any hook scripts you have are not.

-- Brane
Nico Kadel-Garcia
2017-12-05 16:29:19 UTC
Permalink
Post by Branko Čibej
Post by Bo Berglund
I need to migrate a CVSNT server repository to SVN.
The CVSNT cvs executable needs to be used in the cvs2svn script in
order to handle the CVSNT specific peculiarities. So I need to do the
first step of migration on Windows.
The CVS repository is now about 8 GB in size and some version files
(the ,v files) are huge since they hold a large number of revisions of
binary files. Some are 500 Mbytes in size...
When done then I want to move SVN to Linux in order to get away from
the Windows problems.
So once I have the SVN repository, how can I move it over to Linux?
Is there some preferred method?
If your repository isn't being used, just (recursively) copy the
repository directory. The storage format and configuration files are
platform-independent, but of course any hook scripts you have are not.
-- Brane
I'd urge making a complete filesystem copy *anyway*, before beginning.

I don't know if TortoiseSVN contains this kind of utility these days,
but Cygwin certainly does contain cvs2svn, if you want to do the
transformation locally first. There are also some booby traps for old
repositories. I had one devil of a time some years back when someone
had been manually editing the ",v" files to manipulate the stored
comments, and made a mistake. When I *corrected* the mistake by
correcting the line count for the modified comment section, comments
for which there was no history left of the original comment before
editing, the engineer who'd been maintaining the system and who wasn't
supposed to be doing that anymore threw a wobbly on me. But without
the manual correction, cvs2svn could not complete.

Every major Linux has Subversion, so you should be able to bring the
raw CVS repository over. If you do cvs2svn on Windows first, there's
another booby trap. Many server grade versions of Linux have obsolete
Subversion. You may have difficulty if you do cvs2svn with Subversion
1.9.x on the Windows box, and then try to load it with Subversion
1.6.x on a RHEL or CentOS system. So I'd urge you to copy over to the
Linux system first, and do cvs2svn there.

If I may suggest, this is actually a good chance to *discard* content.
Subversion is predicated on an uneditable central repository which
*cannot* be edited. The dump and reload process used for cvs2svn is
one of the few chances to discard obsolete tages, branches, or even
accidentally stored binaries and subdirectories without discarding the
history you care about.

Also. If you want to *really* clear up spurious history, there's
another fairly dirty trick. Use cvs2git instead of cvs2svn. Flush
undesired content from the resulting git repo. Then use a "git gc
--aggressive" This prunes all loose objects which are not part of the
current "HEAD" of the repository. And you can then publish the local
git repository to a new Subversion repository. The new Subversion
repository will *not* be identical to the old CVS repository. But in
most cases, do you really care? Keep the copy of the old CVS repo
backed up, for reference and any legal liability issues.

Be aware: this violates a longstanding principle of Subversion by
discarding history. The only supported method is to do an "svnadmin
dump", with "svndumpfilter" run before feeding the dump to "svnadmin
load". But this is just the time to do that, because cvs2svn or
cvs2git effectively create the dump, and the new Subversion repository
will be treated as a new repository *anyway*.
Branko Čibej
2017-12-05 18:03:05 UTC
Permalink
So I'd urge you to copy over to the Linux system first, and do cvs2svn there.
Whilst I agree with the sentiment, the OP said clearly that he's using
CVSNT which was very much Windows-specific last time I looked. I don't
think he can just move a CVSNT repository to Linux and hope to make
cvs2svn work with it.

-- Brane
Bo Berglund
2017-12-05 18:34:50 UTC
Permalink
On Tue, 5 Dec 2017 11:29:19 -0500, Nico Kadel-Garcia
Post by Nico Kadel-Garcia
Every major Linux has Subversion, so you should be able to bring the
raw CVS repository over. If you do cvs2svn on Windows first, there's
another booby trap. Many server grade versions of Linux have obsolete
Subversion. You may have difficulty if you do cvs2svn with Subversion
1.9.x on the Windows box, and then try to load it with Subversion
1.6.x on a RHEL or CentOS system. So I'd urge you to copy over to the
Linux system first, and do cvs2svn there.
I just created a testing server using Ubuntu Server 16.04.3 LTE x64
and it was not a big deal to get a subversion server integrated into
Apache2 running on it. Took something like 30 minutes all in all
including writing down every step I took.

So now I have a system on which to import the dump file, which I will
try to make on my Windows machine.

As I understand it:
- Get cvs2svn (Done)
- Configure cvs2svn (Not yet done, seems to be quite a hurdle...)
- Run cvs2svn, which creates a dump file
- Move the dump file to the Linux server
- Import the dump into a new repository

By the way, on the new Linux machine:
$ svnadmin --version
svnadmin, version 1.9.3 (r1718519)
compiled Aug 10 2017, 16:59:15 on x86_64-pc-linux-gnu

So this svn seems to be pretty much up-to-date. :)
--
Bo Berglund
Developer in Sweden
Loading...