Error Restore/Migration from gogs to gitea

#1

Hello Gitea users,

I am quite new in Git and services like gogs and gitea. Last summer I started to work with git and gogs on Windows with SQL-Server as database. Everything runs pretty good und I was happy about the integration of Git in my Visual Studio. Now I have the situation that my PC with the Git installation doesn’t work any longer. I have backups of my repositories the backups are created with ‘gogs backup’. Know I have the problem I can’t restore my backup.

I described my problem in the Gogs Forum, but there comes no help.

Now my hope is that a restore/migration by using gitea could be a solution!

I studied this this document:

https://docs.gitea.io/en-us/upgrade-from-gogs/

I executed all steps. When I run ‘gitea web’ the service starts but without my repositories. In the console appears the following error:

Clean up repository temporary data [data\tmp]: exec: "cmd": executable file not found in %!P(MISSING)ATH%!(NOVERB)

Is that the reason for the missing repositories?

What can I do?

I look forward to getting some helpful advices! At now I have the taste to lose the versioning of all my projects.

Kind regards
Christoph

0 Likes

#2

I am going ahead! I migrated all my repositories one by one per web gui. Gitea runs and offers my repositories as expected. I can download projects and work with them, commits are untested till now.

Now I like to upgrade gitea from 1.0.x to the recent version. Gitea 1.8/1.7 starts and shout down after a couple of seconds, without any information.


How to upgrade properly from 1.0.x to the recent version?

Kind regards
Christoph

0 Likes

#3

standard disclaimer: I’m a noob and likely don’t know what I’m talking about. Take what I post with a grain of salt.

That said, I’ve read through your post at gogs and your post here, and am starting to strongly suspect that you might have a problem with your server rather than gogs or gitea (especially if you still have issues even after migrating by hand). Sudden inexplicable shutdowns tend to be good indicators of broader issues with your system.

Have you run diagnostics on your hardware (especially ram)? Are you in a position to reinstall your os?

Also, does gitea manage to write anything at all to the log before crashing?

0 Likes

#4

Thanks a lot for your reply!

I cannot reinstall windows. I don’t belief in problems with the hardware, the machine is brand new, there are no other indicates for problems, all other stuff runs fine.

I added the logfile in the spoiler below:

Expand to see the logfile

2019/04/04 08:45:05 [I] Log Mode: File(Info)
2019/04/04 08:45:05 [I] XORM Log Mode: File(Info)
2019/04/04 08:45:05 [I] Cache Service Enabled
2019/04/04 08:45:05 [I] Session Service Enabled
2019/04/04 08:45:05 [I] Beginning ORM engine initialization.
2019/04/04 08:45:05 [I] ORM engine initialization attempt #1/10…
2019/04/04 08:45:05 [I] Migration: create user column allow create organization
2019/04/04 08:45:05 [I] Migration: create repo unit table and add units for all repos
2019/04/04 08:45:05 [I] Migration: set protect branches updated with created
2019/04/04 08:45:06 [I] Migration: add external login user
2019/04/04 08:45:06 [I] Migration: generate and migrate Git hooks
2019/04/04 08:45:06 [I] Migration: use new avatar path name for security reason
2019/04/04 08:45:06 [I] Migration: rewrite authorized_keys file via new format
2019/04/04 08:45:06 [I] Migration: generate and migrate wiki Git hooks
2019/04/04 08:45:06 [I] Migration: add user openid table
2019/04/04 08:45:06 [I] Migration: change the key_id and primary_key_id type
2019/04/04 08:45:06 [I] Migration: add show field in user openid table
2019/04/04 08:45:06 [I] Migration: generate and migrate repo and wiki Git hooks
2019/04/04 08:45:06 [I] Migration: change mirror interval from hours to time.Duration
2019/04/04 08:45:06 [I] Migration: add field for repo size
2019/04/04 08:45:06 [I] This migration could take up to minutes, please be patient.
2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:06 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:07 [I] Migration: add commit status table
2019/04/04 08:45:08 [I] Migration: add primary key to external login user
2019/04/04 08:45:08 [I] Migration: add field for login source synchronization
2019/04/04 08:45:08 [I] Migration: add units for team
2019/04/04 08:45:08 [I] Migration: remove columns from action
2019/04/04 08:45:08 [W] Unable to drop columns in SQLite
2019/04/04 08:45:08 [I] Migration: give all units to owner teams
2019/04/04 08:45:08 [I] Migration: adds comment to an action
2019/04/04 08:45:08 [I] Migration: regenerate git hooks
2019/04/04 08:45:08 [I] Migration: unescape user full names
2019/04/04 08:45:08 [I] Migration: remove commits and settings unit types
2019/04/04 08:45:08 [I] Migration: add tags to releases and sync existing repositories
2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:08 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 08:45:09 [I] Migration: fix protected branch can push value to false
2019/04/04 08:45:10 [I] Migration: remove duplicate unit types
2019/04/04 08:45:10 [I] Migration: empty step
2019/04/04 08:45:10 [I] Migration: empty step
2019/04/04 08:45:10 [I] Migration: empty step
2019/04/04 08:45:10 [I] Migration: remove index column from repo_unit table
2019/04/04 08:45:10 [W] Unable to drop columns in SQLite
2019/04/04 08:45:10 [I] Migration: remove organization watch repositories
2019/04/04 08:45:10 [I] Migration: add deleted branches
2019/04/04 08:45:10 [I] Migration: add repo indexer status
2019/04/04 08:45:10 [I] Migration: adds time tracking and stopwatches
2019/04/04 08:45:10 [I] Migration: migrate protected branch struct
2019/04/04 08:45:10 [W] Unable to drop columns in SQLite
2019/04/04 08:45:10 [I] Migration: add default value to user prohibit_login
2019/04/04 08:45:10 [I] Migration: add lfs lock table
2019/04/04 08:45:10 [I] Migration: add reactions
2019/04/04 08:45:10 [I] Migration: add pull request options
2019/04/04 08:45:10 [I] Migration: add writable deploy keys
2019/04/04 08:45:10 [I] Migration: remove is_owner, num_teams columns from org_user
2019/04/04 08:45:10 [W] Unable to drop columns in SQLite
2019/04/04 08:45:10 [I] Migration: add closed_unix column for issues
2019/04/04 08:45:10 [I] Migration: add label descriptions
2019/04/04 08:45:10 [I] Migration: add merge whitelist for protected branches
2019/04/04 08:45:10 [I] Migration: add is_fsck_enabled column for repos
2019/04/04 08:45:10 [I] Migration: add size column for attachments
2019/04/04 08:45:10 [I] Migration: add last used passcode column for TOTP
2019/04/04 08:45:10 [I] Migration: add language column for user setting
2019/04/04 08:45:10 [I] Migration: add multiple assignees
2019/04/04 08:45:11 [W] Unable to drop columns in SQLite
2019/04/04 08:45:11 [W] Unable to drop columns in SQLite
2019/04/04 08:45:11 [I] Migration: add u2f
2019/04/04 08:45:11 [I] Migration: add login source id column for public_key table
2019/04/04 08:45:11 [I] Migration: remove stale watches
2019/04/04 08:45:11 [I] Migration: Reformat and remove incorrect topics
2019/04/04 08:45:11 [I] This migration could take up to minutes, please be patient.
2019/04/04 08:45:11 [I] Validating existed topics…
2019/04/04 08:45:11 [I] Deleting incorrect topics…
2019/04/04 08:45:11 [I] Deleting ‘repo_topic’ rows for topics with ids = []
2019/04/04 08:45:11 [I] Deleting topics with id = []
2019/04/04 08:45:11 [I] Checking the number of topics in the repositories…
2019/04/04 08:45:11 [I] Deleting superfluous topics for repositories (more than 25 topics)…
2019/04/04 08:45:11 [I] Updating repositories ‘topics’ fields…
2019/04/04 08:45:11 [I] Migration: move team units to team_unit table
2019/04/04 08:45:11 [W] Unable to drop columns in SQLite
2019/04/04 08:45:11 [I] Migration: add issue_dependencies
2019/04/04 08:45:11 [I] Migration: protect each scratch token
2019/04/04 08:45:11 [I] Backing off for 3 seconds
2019/04/04 08:45:14 [I] ORM engine initialization attempt #2/10…
2019/04/04 08:45:14 [I] Migration: protect each scratch token
2019/04/04 08:45:14 [I] Backing off for 3 seconds
2019/04/04 08:45:17 [I] ORM engine initialization attempt #3/10…
2019/04/04 08:45:17 [I] Migration: protect each scratch token
2019/04/04 08:45:17 [I] Backing off for 3 seconds
2019/04/04 08:45:20 [I] ORM engine initialization attempt #4/10…
2019/04/04 08:45:20 [I] Migration: protect each scratch token
2019/04/04 08:45:20 [I] Backing off for 3 seconds
2019/04/04 08:45:23 [I] ORM engine initialization attempt #5/10…
2019/04/04 08:45:23 [I] Migration: protect each scratch token
2019/04/04 08:45:23 [I] Backing off for 3 seconds
2019/04/04 08:45:26 [I] ORM engine initialization attempt #6/10…
2019/04/04 08:45:26 [I] Migration: protect each scratch token
2019/04/04 08:45:26 [I] Backing off for 3 seconds
2019/04/04 08:45:29 [I] ORM engine initialization attempt #7/10…
2019/04/04 08:45:29 [I] Migration: protect each scratch token
2019/04/04 08:45:29 [I] Backing off for 3 seconds
2019/04/04 08:45:32 [I] ORM engine initialization attempt #8/10…
2019/04/04 08:45:32 [I] Migration: protect each scratch token
2019/04/04 08:45:32 [I] Backing off for 3 seconds
2019/04/04 08:45:35 [I] ORM engine initialization attempt #9/10…
2019/04/04 08:45:35 [I] Migration: protect each scratch token
2019/04/04 08:45:35 [I] Backing off for 3 seconds
2019/04/04 08:45:38 [I] ORM engine initialization attempt #10/10…
2019/04/04 08:45:38 [I] Migration: protect each scratch token
2019/04/04 08:45:38 […itea/routers/init.go:82 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 08:47:05 [I] Log Mode: File(Info)
2019/04/04 08:47:05 [I] XORM Log Mode: File(Info)
2019/04/04 08:47:05 [I] Cache Service Enabled
2019/04/04 08:47:05 [I] Session Service Enabled
2019/04/04 08:47:05 [I] Beginning ORM engine initialization.
2019/04/04 08:47:05 [I] ORM engine initialization attempt #1/10…
2019/04/04 08:47:05 [I] Migration: protect each scratch token
2019/04/04 08:47:05 [I] Backing off for 3 seconds
2019/04/04 08:47:08 [I] ORM engine initialization attempt #2/10…
2019/04/04 08:47:08 [I] Migration: protect each scratch token
2019/04/04 08:47:08 [I] Backing off for 3 seconds
2019/04/04 08:47:11 [I] ORM engine initialization attempt #3/10…
2019/04/04 08:47:11 [I] Migration: protect each scratch token
2019/04/04 08:47:12 [I] Backing off for 3 seconds
2019/04/04 08:47:15 [I] ORM engine initialization attempt #4/10…
2019/04/04 08:47:15 [I] Migration: protect each scratch token
2019/04/04 08:47:15 [I] Backing off for 3 seconds
2019/04/04 08:47:18 [I] ORM engine initialization attempt #5/10…
2019/04/04 08:47:18 [I] Migration: protect each scratch token
2019/04/04 08:47:18 [I] Backing off for 3 seconds
2019/04/04 08:47:21 [I] ORM engine initialization attempt #6/10…
2019/04/04 08:47:21 [I] Migration: protect each scratch token
2019/04/04 08:47:21 [I] Backing off for 3 seconds
2019/04/04 08:47:24 [I] ORM engine initialization attempt #7/10…
2019/04/04 08:47:24 [I] Migration: protect each scratch token
2019/04/04 08:47:24 [I] Backing off for 3 seconds
2019/04/04 08:47:27 [I] ORM engine initialization attempt #8/10…
2019/04/04 08:47:27 [I] Migration: protect each scratch token
2019/04/04 08:47:27 [I] Backing off for 3 seconds
2019/04/04 08:47:30 [I] ORM engine initialization attempt #9/10…
2019/04/04 08:47:30 [I] Migration: protect each scratch token
2019/04/04 08:47:30 [I] Backing off for 3 seconds
2019/04/04 08:47:33 [I] ORM engine initialization attempt #10/10…
2019/04/04 08:47:33 [I] Migration: protect each scratch token
2019/04/04 08:47:33 […itea/routers/init.go:82 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 08:52:56 [I] Log Mode: File(Info)
2019/04/04 08:52:56 [I] XORM Log Mode: File(Info)
2019/04/04 08:52:56 [I] Cache Service Enabled
2019/04/04 08:52:56 [I] Session Service Enabled
2019/04/04 08:52:56 [I] Migration: protect each scratch token
2019/04/04 08:52:56 […itea/routers/init.go:61 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 08:53:17 [I] Log Mode: File(Info)
2019/04/04 08:53:17 [I] XORM Log Mode: File(Info)
2019/04/04 08:53:17 [I] Cache Service Enabled
2019/04/04 08:53:17 [I] Session Service Enabled
2019/04/04 08:53:17 [I] Migration: protect each scratch token
2019/04/04 08:53:17 […itea/routers/init.go:61 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 08:53:31 [I] Log Mode: File(Info)
2019/04/04 08:53:31 [I] XORM Log Mode: File(Info)
2019/04/04 08:53:31 [I] Cache Service Enabled
2019/04/04 08:53:31 [I] Session Service Enabled
2019/04/04 08:53:31 [I] Migration: protect each scratch token
2019/04/04 08:53:31 […itea/routers/init.go:61 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 09:44:38 [I] Log Mode: File(Info)
2019/04/04 09:44:38 [I] XORM Log Mode: File(Info)
2019/04/04 09:44:38 [I] Cache Service Enabled
2019/04/04 09:44:38 [I] Session Service Enabled
2019/04/04 09:44:38 [I] Beginning ORM engine initialization.
2019/04/04 09:44:38 [I] ORM engine initialization attempt #1/10…
2019/04/04 09:44:38 [I] Migration: create user column allow create organization
2019/04/04 09:44:38 [I] Migration: create repo unit table and add units for all repos
2019/04/04 09:44:38 [I] Migration: set protect branches updated with created
2019/04/04 09:44:38 [I] Migration: add external login user
2019/04/04 09:44:38 [I] Migration: generate and migrate Git hooks
2019/04/04 09:44:38 [I] Migration: use new avatar path name for security reason
2019/04/04 09:44:38 [I] Migration: rewrite authorized_keys file via new format
2019/04/04 09:44:38 [I] Migration: generate and migrate wiki Git hooks
2019/04/04 09:44:38 [I] Migration: add user openid table
2019/04/04 09:44:38 [I] Migration: change the key_id and primary_key_id type
2019/04/04 09:44:38 [I] Migration: add show field in user openid table
2019/04/04 09:44:38 [I] Migration: generate and migrate repo and wiki Git hooks
2019/04/04 09:44:39 [I] Migration: change mirror interval from hours to time.Duration
2019/04/04 09:44:39 [I] Migration: add field for repo size
2019/04/04 09:44:39 [I] This migration could take up to minutes, please be patient.
2019/04/04 09:44:40 [W] GetRepoSize: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 09:44:41 [I] Migration: add commit status table
2019/04/04 09:44:41 [I] Migration: add primary key to external login user
2019/04/04 09:44:41 [I] Migration: add field for login source synchronization
2019/04/04 09:44:41 [I] Migration: add units for team
2019/04/04 09:44:41 [I] Migration: remove columns from action
2019/04/04 09:44:41 [W] Unable to drop columns in SQLite
2019/04/04 09:44:41 [I] Migration: give all units to owner teams
2019/04/04 09:44:41 [I] Migration: adds comment to an action
2019/04/04 09:44:41 [I] Migration: regenerate git hooks
2019/04/04 09:44:41 [I] Migration: unescape user full names
2019/04/04 09:44:41 [I] Migration: remove commits and settings unit types
2019/04/04 09:44:41 [I] Migration: add tags to releases and sync existing repositories
2019/04/04 09:44:42 [W] SyncReleasesWithTags: GetTags: exit status 128 - fatal: not a git repository (or any of the parent directories): .git

2019/04/04 09:44:43 [I] Migration: fix protected branch can push value to false
2019/04/04 09:44:43 [I] Migration: remove duplicate unit types
2019/04/04 09:44:43 [I] Migration: empty step
2019/04/04 09:44:43 [I] Migration: empty step
2019/04/04 09:44:43 [I] Migration: empty step
2019/04/04 09:44:43 [I] Migration: remove index column from repo_unit table
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [I] Migration: remove organization watch repositories
2019/04/04 09:44:43 [I] Migration: add deleted branches
2019/04/04 09:44:43 [I] Migration: add repo indexer status
2019/04/04 09:44:43 [I] Migration: adds time tracking and stopwatches
2019/04/04 09:44:43 [I] Migration: migrate protected branch struct
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [I] Migration: add default value to user prohibit_login
2019/04/04 09:44:43 [I] Migration: add lfs lock table
2019/04/04 09:44:43 [I] Migration: add reactions
2019/04/04 09:44:43 [I] Migration: add pull request options
2019/04/04 09:44:43 [I] Migration: add writable deploy keys
2019/04/04 09:44:43 [I] Migration: remove is_owner, num_teams columns from org_user
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [I] Migration: add closed_unix column for issues
2019/04/04 09:44:43 [I] Migration: add label descriptions
2019/04/04 09:44:43 [I] Migration: add merge whitelist for protected branches
2019/04/04 09:44:43 [I] Migration: add is_fsck_enabled column for repos
2019/04/04 09:44:43 [I] Migration: add size column for attachments
2019/04/04 09:44:43 [I] Migration: add last used passcode column for TOTP
2019/04/04 09:44:43 [I] Migration: add language column for user setting
2019/04/04 09:44:43 [I] Migration: add multiple assignees
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [I] Migration: add u2f
2019/04/04 09:44:43 [I] Migration: add login source id column for public_key table
2019/04/04 09:44:43 [I] Migration: remove stale watches
2019/04/04 09:44:43 [I] Migration: Reformat and remove incorrect topics
2019/04/04 09:44:43 [I] This migration could take up to minutes, please be patient.
2019/04/04 09:44:43 [I] Validating existed topics…
2019/04/04 09:44:43 [I] Deleting incorrect topics…
2019/04/04 09:44:43 [I] Deleting ‘repo_topic’ rows for topics with ids = []
2019/04/04 09:44:43 [I] Deleting topics with id = []
2019/04/04 09:44:43 [I] Checking the number of topics in the repositories…
2019/04/04 09:44:43 [I] Deleting superfluous topics for repositories (more than 25 topics)…
2019/04/04 09:44:43 [I] Updating repositories ‘topics’ fields…
2019/04/04 09:44:43 [I] Migration: move team units to team_unit table
2019/04/04 09:44:43 [W] Unable to drop columns in SQLite
2019/04/04 09:44:43 [I] Migration: add issue_dependencies
2019/04/04 09:44:43 [I] Migration: protect each scratch token
2019/04/04 09:44:44 [I] Backing off for 3 seconds
2019/04/04 09:44:47 [I] ORM engine initialization attempt #2/10…
2019/04/04 09:44:47 [I] Migration: protect each scratch token
2019/04/04 09:44:47 [I] Backing off for 3 seconds
2019/04/04 09:44:50 [I] ORM engine initialization attempt #3/10…
2019/04/04 09:44:50 [I] Migration: protect each scratch token
2019/04/04 09:44:50 [I] Backing off for 3 seconds
2019/04/04 09:44:53 [I] ORM engine initialization attempt #4/10…
2019/04/04 09:44:53 [I] Migration: protect each scratch token
2019/04/04 09:44:53 [I] Backing off for 3 seconds
2019/04/04 09:44:56 [I] ORM engine initialization attempt #5/10…
2019/04/04 09:44:56 [I] Migration: protect each scratch token
2019/04/04 09:44:56 [I] Backing off for 3 seconds
2019/04/04 09:44:59 [I] ORM engine initialization attempt #6/10…
2019/04/04 09:44:59 [I] Migration: protect each scratch token
2019/04/04 09:44:59 [I] Backing off for 3 seconds
2019/04/04 09:45:02 [I] ORM engine initialization attempt #7/10…
2019/04/04 09:45:02 [I] Migration: protect each scratch token
2019/04/04 09:45:02 [I] Backing off for 3 seconds
2019/04/04 09:45:05 [I] ORM engine initialization attempt #8/10…
2019/04/04 09:45:05 [I] Migration: protect each scratch token
2019/04/04 09:45:05 [I] Backing off for 3 seconds
2019/04/04 09:45:08 [I] ORM engine initialization attempt #9/10…
2019/04/04 09:45:08 [I] Migration: protect each scratch token
2019/04/04 09:45:08 [I] Backing off for 3 seconds
2019/04/04 09:45:11 [I] ORM engine initialization attempt #10/10…
2019/04/04 09:45:11 [I] Migration: protect each scratch token
2019/04/04 09:45:11 […itea/routers/init.go:82 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/04 09:49:33 [I] Log Mode: File(Info)
2019/04/04 09:49:33 [I] XORM Log Mode: File(Info)
2019/04/04 09:49:33 [I] Cache Service Enabled
2019/04/04 09:49:33 [I] Session Service Enabled
2019/04/04 09:49:33 [I] Beginning ORM engine initialization.
2019/04/04 09:49:33 [I] ORM engine initialization attempt #1/10…
2019/04/04 09:49:33 [I] Migration: protect each scratch token
2019/04/04 09:49:33 [I] Backing off for 3 seconds
2019/04/04 09:49:36 [I] ORM engine initialization attempt #2/10…
2019/04/04 09:49:36 [I] Migration: protect each scratch token
2019/04/04 09:49:36 [I] Backing off for 3 seconds
2019/04/04 09:49:39 [I] ORM engine initialization attempt #3/10…
2019/04/04 09:49:39 [I] Migration: protect each scratch token
2019/04/04 09:49:39 [I] Backing off for 3 seconds
2019/04/04 09:49:42 [I] ORM engine initialization attempt #4/10…
2019/04/04 09:49:42 [I] Migration: protect each scratch token
2019/04/04 09:49:43 [I] Backing off for 3 seconds
2019/04/04 09:49:46 [I] ORM engine initialization attempt #5/10…
2019/04/04 09:49:46 [I] Migration: protect each scratch token
2019/04/04 09:49:46 [I] Backing off for 3 seconds
2019/04/04 09:49:49 [I] ORM engine initialization attempt #6/10…
2019/04/04 09:49:49 [I] Migration: protect each scratch token
2019/04/04 09:49:49 [I] Backing off for 3 seconds
2019/04/04 09:49:52 [I] ORM engine initialization attempt #7/10…
2019/04/04 09:49:52 [I] Migration: protect each scratch token
2019/04/04 09:49:52 [I] Backing off for 3 seconds
2019/04/04 09:49:55 [I] ORM engine initialization attempt #8/10…
2019/04/04 09:49:55 [I] Migration: protect each scratch token
2019/04/04 09:49:55 [I] Backing off for 3 seconds
2019/04/04 09:49:58 [I] ORM engine initialization attempt #9/10…
2019/04/04 09:49:58 [I] Migration: protect each scratch token
2019/04/04 09:49:58 [I] Backing off for 3 seconds
2019/04/04 09:50:01 [I] ORM engine initialization attempt #10/10…
2019/04/04 09:50:01 [I] Migration: protect each scratch token
2019/04/04 09:50:01 […itea/routers/init.go:82 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column
2019/04/05 08:35:35 [I] Log Mode: File(Info)
2019/04/05 08:35:35 [I] XORM Log Mode: File(Info)
2019/04/05 08:35:35 [I] Cache Service Enabled
2019/04/05 08:35:35 [I] Session Service Enabled
2019/04/05 08:35:35 [I] Beginning ORM engine initialization.
2019/04/05 08:35:35 [I] ORM engine initialization attempt #1/10…
2019/04/05 08:35:35 [I] Migration: protect each scratch token
2019/04/05 08:35:35 [I] Backing off for 3 seconds
2019/04/05 08:35:38 [I] ORM engine initialization attempt #2/10…
2019/04/05 08:35:38 [I] Migration: protect each scratch token
2019/04/05 08:35:38 [I] Backing off for 3 seconds
2019/04/05 08:35:41 [I] ORM engine initialization attempt #3/10…
2019/04/05 08:35:41 [I] Migration: protect each scratch token
2019/04/05 08:35:41 [I] Backing off for 3 seconds
2019/04/05 08:35:44 [I] ORM engine initialization attempt #4/10…
2019/04/05 08:35:44 [I] Migration: protect each scratch token
2019/04/05 08:35:44 [I] Backing off for 3 seconds
2019/04/05 08:35:47 [I] ORM engine initialization attempt #5/10…
2019/04/05 08:35:47 [I] Migration: protect each scratch token
2019/04/05 08:35:47 [I] Backing off for 3 seconds
2019/04/05 08:35:50 [I] ORM engine initialization attempt #6/10…
2019/04/05 08:35:50 [I] Migration: protect each scratch token
2019/04/05 08:35:50 [I] Backing off for 3 seconds
2019/04/05 08:35:53 [I] ORM engine initialization attempt #7/10…
2019/04/05 08:35:53 [I] Migration: protect each scratch token
2019/04/05 08:35:53 [I] Backing off for 3 seconds
2019/04/05 08:35:56 [I] ORM engine initialization attempt #8/10…
2019/04/05 08:35:56 [I] Migration: protect each scratch token
2019/04/05 08:35:56 [I] Backing off for 3 seconds
2019/04/05 08:35:59 [I] ORM engine initialization attempt #9/10…
2019/04/05 08:35:59 [I] Migration: protect each scratch token
2019/04/05 08:35:59 [I] Backing off for 3 seconds
2019/04/05 08:36:02 [I] ORM engine initialization attempt #10/10…
2019/04/05 08:36:02 [I] Migration: protect each scratch token
2019/04/05 08:36:02 […itea/routers/init.go:82 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Sync2: Cannot add a PRIMARY KEY column

Thanks a lot for the support!
Kind regards
Christoph

0 Likes

#5

Many users have reported issues when upgrading gitea using the sqlite3 backend. See for example: Upgrade gitea 1.6 to 1.7 problem. Perhaps your issues and these issues stem from the same underlying reason? (i.e. a bug in gitea’s sqlite3 code)

Either way, the log seems to indicate database trouble or at least inconsistency.

Also note that 1.8 is a release candidate and not an official release yet. The change logs for 1.8 list breaking changes that may or may not play a role in the migration’s failure.

What I would do is to:

  1. download 1.6.x or even 1.5.x, and see if migration succeeds from 1.0.x, or
  2. download every major release (1.1, 1.2, 1.3, 1.4, 1.5, 1.6, and 1.7). and run them at least once in order so that the database is incrementally updated, or
  3. wait for a more knowledgeable member of this forum to weigh in with their knowledge.

I hesitate to suggest option 4 (redo manual migration by hand). Depending on the amount of data you need to migrate. I doubt you’re willing to redo all that tedious work all over again.

If you’re not particularly attached to gitea, have you looked at gitlab? I’ve been evaluating them for a couple of days and they offer a very compelling feature set if you can ignore their shortcomings. They support automatic migration from your gitea instance and their update process is as simple and atomic as gitea’s if you use docker images. The only issue is that you’ll need to use a VM since you use windows.

0 Likes

#6

This is what I had to do when I had problems, took a while but it worked in the end.

0 Likes

#7

Another option is to open an issue on gitea’s github. Rereading op’s description, I think that placing the issue in front of the developers’ eyes might be more appropriate than posting it here given the nature of this issue.

0 Likes

#8

Hello!

Thanks a lot for the reply’s! My solution was (just some minutes ago!) to migrate by using http migration, not from the local files! I did it like shown here:

Finally I have to try backup und restore via gitea. I found this document:

https://docs.gitea.io/en-us/backup-and-restore/

But where is the description for a restore workflow?

Kind regards
Christoph

0 Likes