# Error Restoring Backup on Migration

**URL:** https://meta.discourse.org/t/error-restoring-backup-on-migration/128849
**Category:** Bug
**Created:** [September 18, 2019, 12:36am UTC](https://meta.discourse.org/t/error-restoring-backup-on-migration/128849 "2019-09-18T00:36:22Z")
**Posts on this page:** 1
**Showing post:** 18

<div class="post-metadata">

### Author: ![kerray](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kerray/32/139168_2.png) [@kerray](https://meta.discourse.org/u/kerray)
#### Post date: [September 25, 2019, 2:01pm UTC](https://meta.discourse.org/t/error-restoring-backup-on-migration/128849/18 "2019-09-25T14:01:17Z")

</div>

The user\_profiles table in my old backup really doesn’t contain column card\_image\_badge\_id, so I edited the sql dump, added the new column (but not the profile\_background\_upload\_id and card\_background\_upload\_id that are present in newer schemas) - the CREATE TABLE now looks like this

```
CREATE TABLE public.user_profiles (
        user_id integer NOT NULL,
        location character varying,
        website character varying,
        bio_raw text,
        bio_cooked text,
        profile_background character varying(255),
        dismissed_banner_key integer,
        bio_cooked_version integer,
        badge_granted_title boolean DEFAULT false,
        card_background character varying(255),
        card_image_badge_id integer,
        views integer DEFAULT 0 NOT NULL
    );

```

and the restore worked. I get 500 after logging in to the site, but that may be the problem I’ve tried to escape from by starting the new instance in the first place.

---

_[View the full topic](https://meta.discourse.org/t/error-restoring-backup-on-migration/128849)._
