Update README.md for AWXBackup pg_dump_suffix #2020
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
The original command in this README.md does not seem to yield a usable AWXBackup object for me. I receive the following error when using it:
[\"pg_restore: error: could not execute query: ERROR: insert or update on table \\\"main_activitystream_job\\\" violates foreign key constraint \\\"main_activitystream__job_id_aa6811b5_fk_main_job_\\\"\", \"DETAIL: Key (job_id)=(56322) is not present in table \\\"main_job\\\".\", \"Command was: ALTER TABLE ONLY public.main_activitystream_job\", \" ADD CONSTRAINT main_activitystream__job_id_aa6811b5_fk_main_job_ FOREIGN KEY (job_id) REFERENCES public.main_job(unifiedjob_ptr_id) DEFERRABLE INITIALLY DEFERRED;\", \"\", \"\", \"pg_restore: error: could not execute query: ERROR: insert or update on table \\\"main_host\\\" violates foreign key constraint \\\"main_host_last_job_id_d247075b_fk_main_job_unifiedjob_ptr_id\\\"\", \"DETAIL: Key (last_job_id)=(57349) is not present in table \\\"main_job\\\".\", \"Command was: ALTER TABLE ONLY public.main_host\", \" ADD CONSTRAINT main_host_last_job_id_d247075b_fk_main_job_unifiedjob_ptr_id FOREIGN KEY (last_job_id) REFERENCES public.main_job(unifiedjob_ptr_id) DEFERRABLE INITIALLY DEFERRED;\", \"\", \"\", \"pg_restore: error: could not execute query: ERROR: insert or update on table \\\"main_jobhostsummary\\\" violates foreign key constraint \\\"main_jobhostsummary_job_id_8d60afa0_fk_main_job_\\\"\", \"DETAIL: Key (job_id)=(57072) is not present in table \\\"main_job\\\".\", \"Command was: ALTER TABLE ONLY public.main_jobhostsummary\", \" ADD CONSTRAINT main_jobhostsummary_job_id_8d60afa0_fk_main_job_ FOREIGN KEY (job_id) REFERENCES public.main_job(unifiedjob_ptr_id) DEFERRABLE INITIALLY DEFERRED;\", \"\", \"\", \"pg_restore: warning: errors ignored on restore: 3\", \"Terminated\"], \"stdout\": \"keepalive_pid: 56\\nMigrating data from old database...\\n\", \"stdout_lines\": [\"keepalive_pid: 56\", \"Migrating data from old database...\"]}
The updated command for pg_dump_suffix,
"--exclude-table-data 'main_jobevent*' --exclude-table-data '*main_systemjobevent*' --exclude-table-data '*main_activitystream_*'"
seems to yield a usable AWXBackup object that is approximately 97% smaller than a full backup without the command. I'm hoping this might help others who run in to the issue.If there's anything I'm missing, please let me know.
ISSUE TYPE