pg_restore --clean --create -h database.url -U website /tmp/restore/website_db_backup.dump
Installed 428 object(s) from 1 fixture(s)
File "/usr/local/lib/python3.4/dist-packages/wagtail/wagtailcore/models.py", line 132, in find_for_request
return Site.objects.get(is_default_site=True)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/query.py", line 391, in get
(self.model._meta.object_name, num)
wagtail.wagtailcore.models.MultipleObjectsReturned: get() returned more than one Site -- it returned 2!
select * from wagtailcore_site where is_default_site is true;
psql -h stage.example.com -U website -c "update wagtailcore_site set is_default_site = 'f';"
python3 manage.py loaddata /tmp/restore/website_db_backup_nfp.json
psql -h website-rds.internal.stage.example.com -U website -c 'SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = current_database() AND pid <> pg_backend_pid();'dropdb -h website-rds.internal.stage.example.com -U website website
createdb -h website-rds.internal.stage.example.com -U website -T template0 websitepg_restore -h website-rds.internal.stage.example.com -U website -d website /tmp/restore/website_db_backup.dump
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3394; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
pg_restore: WARNING: no privileges could be revoked for "public"
pg_restore: WARNING: no privileges could be revoked for "public"
pg_restore: WARNING: no privileges were granted for "public"
pg_restore: WARNING: no privileges were granted for "public"
WARNING: errors ignored on restore: 1
To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/88578ad1-7043-4c6b-b09c-641d138e8901%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Wagtail support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wagtail+u...@googlegroups.com.
To post to this group, send email to wag...@googlegroups.com.
Visit this group at https://groups.google.com/group/wagtail.