Summary
I create a backup using mmomni backup -o /backup/20230313.tgz without error.
When I try to restore the backup using mmomni restore /backup/20230313.tgz, I get errors.
Steps to reproduce
On 7.8. Create backup. Restore backup on a new installation.
Expected behavior
Was expecting the restore to work, being able to then continue with a mmomni reconfigure.
Observed behavior
The error messages I get are:
ubuntu@:/backups$ sudo mmomni restore 20230313.tgz
Backup extracted into temporal directory “/tmp/mmomni_714919275”
Configuration restored in “/etc/mattermost/mmomni.yml”
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3598; 2606 17057 FK CONSTRAINT ir_timelineevent ir_timelineevent_incidentid_fkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_timelineevent” does not exist
Command was: ALTER TABLE ONLY public.ir_timelineevent DROP CONSTRAINT ir_timelineevent_incidentid_fkey;
pg_restore: from TOC entry 3597; 2606 17029 FK CONSTRAINT ir_statusposts ir_statusposts_incidentid_fkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_statusposts” does not exist
Command was: ALTER TABLE ONLY public.ir_statusposts DROP CONSTRAINT ir_statusposts_incidentid_fkey;
pg_restore: from TOC entry 3596; 2606 17009 FK CONSTRAINT ir_playbookmember ir_playbookmember_playbookid_fkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_playbookmember” does not exist
Command was: ALTER TABLE ONLY public.ir_playbookmember DROP CONSTRAINT ir_playbookmember_playbookid_fkey;
pg_restore: from TOC entry 3558; 1259 17063 INDEX ir_timelineevent_incidentid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_timelineevent_incidentid” does not exist
Command was: DROP INDEX public.ir_timelineevent_incidentid;
pg_restore: from TOC entry 3557; 1259 17062 INDEX ir_timelineevent_id mmuser
pg_restore: error: could not execute query: ERROR: index “ir_timelineevent_id” does not exist
Command was: DROP INDEX public.ir_timelineevent_id;
pg_restore: from TOC entry 3556; 1259 17035 INDEX ir_statusposts_postid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_statusposts_postid” does not exist
Command was: DROP INDEX public.ir_statusposts_postid;
pg_restore: from TOC entry 3551; 1259 17034 INDEX ir_statusposts_incidentid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_statusposts_incidentid” does not exist
Command was: DROP INDEX public.ir_statusposts_incidentid;
pg_restore: from TOC entry 3548; 1259 17018 INDEX ir_playbookmember_playbookid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_playbookmember_playbookid” does not exist
Command was: DROP INDEX public.ir_playbookmember_playbookid;
pg_restore: from TOC entry 3545; 1259 17019 INDEX ir_playbookmember_memberid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_playbookmember_memberid” does not exist
Command was: DROP INDEX public.ir_playbookmember_memberid;
pg_restore: from TOC entry 3544; 1259 17100 INDEX ir_playbook_updateat mmuser
pg_restore: error: could not execute query: ERROR: index “ir_playbook_updateat” does not exist
Command was: DROP INDEX public.ir_playbook_updateat;
pg_restore: from TOC entry 3543; 1259 17017 INDEX ir_playbook_teamid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_playbook_teamid” does not exist
Command was: DROP INDEX public.ir_playbook_teamid;
pg_restore: from TOC entry 3540; 1259 17015 INDEX ir_incident_teamid_commanderuserid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_incident_teamid_commanderuserid” does not exist
Command was: DROP INDEX public.ir_incident_teamid_commanderuserid;
pg_restore: from TOC entry 3539; 1259 17014 INDEX ir_incident_teamid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_incident_teamid” does not exist
Command was: DROP INDEX public.ir_incident_teamid;
pg_restore: from TOC entry 3534; 1259 17016 INDEX ir_incident_channelid mmuser
pg_restore: error: could not execute query: ERROR: index “ir_incident_channelid” does not exist
Command was: DROP INDEX public.ir_incident_channelid;
pg_restore: from TOC entry 3274; 2606 16409 CONSTRAINT schema_migrations schema_migrations_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.schema_migrations” does not exist
Command was: ALTER TABLE ONLY public.schema_migrations DROP CONSTRAINT schema_migrations_pkey;
pg_restore: from TOC entry 3562; 2606 17535 CONSTRAINT ir_viewedchannel ir_viewedchannel_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_viewedchannel” does not exist
Command was: ALTER TABLE ONLY public.ir_viewedchannel DROP CONSTRAINT ir_viewedchannel_pkey;
pg_restore: from TOC entry 3580; 2606 17795 CONSTRAINT ir_userinfo ir_userinfo_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_userinfo” does not exist
Command was: ALTER TABLE ONLY public.ir_userinfo DROP CONSTRAINT ir_userinfo_pkey;
pg_restore: from TOC entry 3560; 2606 17529 CONSTRAINT ir_timelineevent ir_timelineevent_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_timelineevent” does not exist
Command was: ALTER TABLE ONLY public.ir_timelineevent DROP CONSTRAINT ir_timelineevent_pkey;
pg_restore: from TOC entry 3533; 2606 16975 CONSTRAINT ir_system ir_system_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_system” does not exist
Command was: ALTER TABLE ONLY public.ir_system DROP CONSTRAINT ir_system_pkey;
pg_restore: from TOC entry 3555; 2606 17516 CONSTRAINT ir_statusposts ir_statusposts_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_statusposts” does not exist
Command was: ALTER TABLE ONLY public.ir_statusposts DROP CONSTRAINT ir_statusposts_pkey;
pg_restore: from TOC entry 3553; 2606 17028 CONSTRAINT ir_statusposts ir_statusposts_incidentid_postid_key mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_statusposts” does not exist
Command was: ALTER TABLE ONLY public.ir_statusposts DROP CONSTRAINT ir_statusposts_incidentid_postid_key;
pg_restore: from TOC entry 3550; 2606 17008 CONSTRAINT ir_playbookmember ir_playbookmember_playbookid_memberid_key mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_playbookmember” does not exist
Command was: ALTER TABLE ONLY public.ir_playbookmember DROP CONSTRAINT ir_playbookmember_playbookid_memberid_key;
pg_restore: from TOC entry 3547; 2606 17510 CONSTRAINT ir_playbookmember ir_playbookmember_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_playbookmember” does not exist
Command was: ALTER TABLE ONLY public.ir_playbookmember DROP CONSTRAINT ir_playbookmember_pkey;
pg_restore: from TOC entry 3542; 2606 17000 CONSTRAINT ir_playbook ir_playbook_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_playbook” does not exist
Command was: ALTER TABLE ONLY public.ir_playbook DROP CONSTRAINT ir_playbook_pkey;
pg_restore: from TOC entry 3538; 2606 16987 CONSTRAINT ir_incident ir_incident_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_incident” does not exist
Command was: ALTER TABLE ONLY public.ir_incident DROP CONSTRAINT ir_incident_pkey;
pg_restore: from TOC entry 3536; 2606 16989 CONSTRAINT ir_incident ir_incident_channelid_key mmuser
pg_restore: error: could not execute query: ERROR: relation “public.ir_incident” does not exist
Command was: ALTER TABLE ONLY public.ir_incident DROP CONSTRAINT ir_incident_channelid_key;
pg_restore: from TOC entry 3576; 2606 17504 CONSTRAINT focalboard_workspaces focalboard_workspaces_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “public.focalboard_workspaces” does not exist
Command was: ALTER TABLE ONLY public.focalboard_workspaces DROP CONSTRAINT focalboard_workspaces_pkey;
pg_restore: from TOC entry 202; 1259 16405 TABLE schema_migrations mmuser
pg_restore: error: could not execute query: ERROR: table “schema_migrations” does not exist
Command was: DROP TABLE public.schema_migrations;
pg_restore: from TOC entry 263; 1259 17083 TABLE ir_viewedchannel mmuser
pg_restore: error: could not execute query: ERROR: table “ir_viewedchannel” does not exist
Command was: DROP TABLE public.ir_viewedchannel;
pg_restore: from TOC entry 272; 1259 17786 TABLE ir_userinfo mmuser
pg_restore: error: could not execute query: ERROR: table “ir_userinfo” does not exist
Command was: DROP TABLE public.ir_userinfo;
pg_restore: from TOC entry 262; 1259 17044 TABLE ir_timelineevent mmuser
pg_restore: error: could not execute query: ERROR: table “ir_timelineevent” does not exist
Command was: DROP TABLE public.ir_timelineevent;
pg_restore: from TOC entry 257; 1259 16968 TABLE ir_system mmuser
pg_restore: error: could not execute query: ERROR: table “ir_system” does not exist
Command was: DROP TABLE public.ir_system;
pg_restore: from TOC entry 261; 1259 17021 TABLE ir_statusposts mmuser
pg_restore: error: could not execute query: ERROR: table “ir_statusposts” does not exist
Command was: DROP TABLE public.ir_statusposts;
pg_restore: from TOC entry 260; 1259 17001 TABLE ir_playbookmember mmuser
pg_restore: error: could not execute query: ERROR: table “ir_playbookmember” does not exist
Command was: DROP TABLE public.ir_playbookmember;
pg_restore: from TOC entry 259; 1259 16990 TABLE ir_playbook mmuser
pg_restore: error: could not execute query: ERROR: table “ir_playbook” does not exist
Command was: DROP TABLE public.ir_playbook;
pg_restore: from TOC entry 258; 1259 16976 TABLE ir_incident mmuser
pg_restore: error: could not execute query: ERROR: table “ir_incident” does not exist
Command was: DROP TABLE public.ir_incident;
pg_restore: from TOC entry 270; 1259 17497 TABLE focalboard_workspaces mmuser
pg_restore: error: could not execute query: ERROR: table “focalboard_workspaces” does not exist
Command was: DROP TABLE public.focalboard_workspaces;
pg_restore: from TOC entry 3576; 2606 17504 CONSTRAINT focalboard_workspaces focalboard_workspaces_pkey mmuser
pg_restore: error: could not execute query: ERROR: relation “focalboard_workspaces_pkey” already exists
Command was: ALTER TABLE ONLY public.focalboard_workspaces
ADD CONSTRAINT focalboard_workspaces_pkey PRIMARY KEY (id);
pg_restore: warning: errors ignored on restore: 38
ERROR: error restoring database backup “/tmp/mmomni_714919275/database.dump”: exit status 1
ubuntu@:/backups$