Migrate server from Windows to Linux issues
I'm having a nightmare with migrating our Test Windows YouTrack server over to our Linux machine.
We've been running with YouTrack for a few months now, and have decided to purchase a license, we're now planning to migrate this server over to our Linux machine for the final rollout. This is causing us problems.
Steps Taken
After spending a good few hours searching the forums for a fix, or something similar, we decided it may be easier just to run YouTrack2YouTrack.py.
This fails with the following output having not managed to import a single issue.
Import issue link types Error for [/admin/issueLinkType/Depend?inwardName=depends+on&directed=true&outwardName=is+required+for]: 409: Conflict: Issue link type [ Depend ] already exists. Error for [/admin/issueLinkType/Duplicate?inwardName=duplicates&directed=true&outwardName=is+duplicated+by]: 409: Conflict: Issue link type [ Duplicate ] already exists. Error for [/admin/issueLinkType/Relates?inwardName=relates+to&directed=false&outwardName=relates+to]: 409: Conflict: Issue link type [ Relates ] already exists. Error for [/admin/issueLinkType/Subtask?inwardName=subtask+of&directed=true&outwardName=parent+for]: 409: Conflict: Issue link type [ Subtask ] already exists. Create project stub [BlitzTech] Create project lead [lhomewood] None Traceback (most recent call last): File "youtrack2youtrack.py", line 253, in <module> main() File "youtrack2youtrack.py", line 25, in main youtrack2youtrack(source_url, source_login, source_password, target_url, target_login, target_password, project_ids) File "youtrack2youtrack.py", line 147, in youtrack2youtrack target.createCustomField(source_cf) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 643, in createCustomField params) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 655, in createCustomFieldDetailed urllib.urlencode(params), )
It seems to have created the project, a lead, and some usergroups, but has only managed to import the non-custom fields.
We've been running with YouTrack for a few months now, and have decided to purchase a license, we're now planning to migrate this server over to our Linux machine for the final rollout. This is causing us problems.
Steps Taken
- TeamCity JAR running on Linux correctly
- Blank server with our new license enabled
- Blank server with our new license enabled
- Copied the C:\teamsysdata folder from the Windows machine onto the Linux machine
- Provided full root privileges to the new teamsysdata folder (matching the user)
- Deleted the .youtrack folder
- Removed any *.lck files within teamsysdata
- Restarted the linux server, and we have a raft of Java errors, the first of which suggesting the following..
After spending a good few hours searching the forums for a fix, or something similar, we decided it may be easier just to run YouTrack2YouTrack.py.
This fails with the following output having not managed to import a single issue.
Import issue link types Error for [/admin/issueLinkType/Depend?inwardName=depends+on&directed=true&outwardName=is+required+for]: 409: Conflict: Issue link type [ Depend ] already exists. Error for [/admin/issueLinkType/Duplicate?inwardName=duplicates&directed=true&outwardName=is+duplicated+by]: 409: Conflict: Issue link type [ Duplicate ] already exists. Error for [/admin/issueLinkType/Relates?inwardName=relates+to&directed=false&outwardName=relates+to]: 409: Conflict: Issue link type [ Relates ] already exists. Error for [/admin/issueLinkType/Subtask?inwardName=subtask+of&directed=true&outwardName=parent+for]: 409: Conflict: Issue link type [ Subtask ] already exists. Create project stub [BlitzTech] Create project lead [lhomewood] None Traceback (most recent call last): File "youtrack2youtrack.py", line 253, in <module> main() File "youtrack2youtrack.py", line 25, in main youtrack2youtrack(source_url, source_login, source_password, target_url, target_login, target_password, project_ids) File "youtrack2youtrack.py", line 147, in youtrack2youtrack target.createCustomField(source_cf) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 643, in createCustomField params) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 655, in createCustomFieldDetailed urllib.urlencode(params), )
It seems to have created the project, a lead, and some usergroups, but has only managed to import the non-custom fields.
Please sign in to leave a comment.
Traceback (most recent call last): File "youtrack2youtrack.py", line 253, in <module> main() File "youtrack2youtrack.py", line 25, in main youtrack2youtrack(source_url, source_login, source_password, target_url, target_login, target_password, project_ids) File "youtrack2youtrack.py", line 147, in youtrack2youtrack target.createCustomField(source_cf) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 643, in createCustomField params) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 655, in createCustomFieldDetailed urllib.urlencode(params), ) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 77, in _put return self._reqXml('PUT', url, '<empty/>\n\n') File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 54, in _reqXml response, content = self._req(method, url, body, ignoreStatus) File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 47, in _req raise youtrack.YouTrackException(url, response, content) youtrack.YouTrackException: Error for [/admin/customfield/field/Requested%20For?defaultBundle=requestedfor_bundle&attachBundlePolicy=0&isPrivate=false&type=enum%5B%2A%5D&autoAttached=true&defaultVisibility=false]: 400: Bad Request: Can't find enumeration with name [requestedfor_bundle]
requestedfor_bundle is a custom bundle in our YouTrack server, shouldn't the YouTrack2Youtrack script handle the copying of these onto the newer one?
Hope this nightmare is going to be finished )
I assume, the best way in your case is to make a YouTrack backup on your Win machine (from Administration-> Database export), and then utilize it on Linux. It will run correctly.
Speaking of issues causes, seems that database is corrupted (after moving to Linux), this is the message saying about this:
Regarding YouTrack2YouTrack import, please check that URL is correctly. Please note, that script won't import Agile board configuration.
I recommend you to try variant with backup first.
Thank you.
Hopefully the database isn't actually corrupted, as we're running it fine on Windows still.
The Youtrack2Youtrack import was our last attempt of making things work before attempting to contact you.
We'll let yo know how we get on.
Yes, I understand that YouTrack2YouTrack import was your last attempt. But, I just want to warn you that, it's not a good idea in your case.
So, I'll be waiting for you with results of backup utilizing.
Thank you.
I've created a task http://youtrack.jetbrains.com/issue/JT-19734 . It'll be helpful.
Such a simple fix in the end.
Thank you Andrey.
That's great.
Thank you for commenting related issue.