# \[SOLVED\] Cannot restore after server migration

**URL:** <https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299>\
**Category:** Install/Maintain/Configure\
**Created:** [May 28, 2018, 5:58pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299 "2018-05-28T17:58:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![farhang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/farhang/32/4737_2.png) [@farhang](https://forum.gitea.com/u/farhang)\
**Post date:** [May 28, 2018, 5:58pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299/1 "2018-05-28T17:58:36Z")

</div>

Hi all,

I posted about this on GitHub as [an issue](https://github.com/go-gitea/gitea/issues/4016) and as it’s been a week, I thought I would seek some advice here.

## Description

I followed [these steps from the docs](https://docs.gitea.io/en-us/backup-and-restore/) as I had to change my VPS provider.

During the restore process, the difficulty is with SQLite. Doing:  
`sqlite3 $DATABASE_PATH <gitea-db.sql`  
gives hundreds of errors, such as

```auto
Error: near line 1459: no such column: true
Error: near line 1460: no such column: true
Error: near line 1468: no such column: false
Error: near line 1469: no such column: false

```

The previous server had the same git and gitea versions.

Any suggestion would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [May 29, 2018, 4:48pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299/2 "2018-05-29T16:48:58Z")

</div>

Hi @farhang,

In your backup is there a file name `gitea.db`? I recently migrated VMs, and instead of running the sql file I just put the sqlite file from my old install into the new directory.

Let me know if that works.

Thanks,  
@techknowlogick

---

<div class="post-metadata">

**Author:** ![farhang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/farhang/32/4737_2.png) [@farhang](https://forum.gitea.com/u/farhang)\
**Post date:** [May 31, 2018, 2:50pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299/3 "2018-05-31T14:50:11Z")

</div>

I cannot thank you enough! You saved my repos! I did not have gitea.db in the zip but out of paranoia I had saved that on my own just in the case. What a case.

Thanks a million, really.

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [May 31, 2018, 3:04pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299/4 "2018-05-31T15:04:26Z")

</div>

Glad that worked 😃

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [May 31, 2018, 3:04pm UTC](https://forum.gitea.com/t/solved-cannot-restore-after-server-migration/299/5 "2018-05-31T15:04:42Z")

</div>

Closed on May 31, 2018, 3:04pm UTC


