Regarding data back mechanism

Dear Sir,

I will first thank for such beautiful software. I have used this software for hosting three conference in my local setup.

Now my concern is how to have a defined back up mechanism. Scenario is suppose any issue to website then how to restore.

  • use pg_dump to create a backup of the database
  • back up your /opt/indico/archive folder for any uploaded files

Have these two things would be sufficient to restore indico on another system.

I have done following :slight_smile: sudo su indico

pg_dump -d indico > dbback.sql

Now to restore psql -d indico -f dbback.sql
but i got error . below is the small portion of error

l:xxxxx.sql:12267: ERROR: relation “ix_uq_attachment_principals_user” already exists
psql:xxxxx.sql:12274: ERROR: relation “ix_uq_folder_principals_local_group” already exists
psql:xxxxx.sql:12281: ERROR: relation “ix_uq_folder_principals_mp_group” already exists
psql:xxxxx.sql:12288: ERROR: relation “ix_uq_folder_principals_user” already exists
psql:xxxxx.sql:12295: ERROR: relation “ix_uq_folders_category_id” already exists
psql:xxxxx.sql:12302: ERROR: relation “ix_uq_folders_contribution_id” already exists
psql:xxxxx.sql:12309: ERROR: relation “ix_uq_folders_linked_event_id” already exists
psql:xxxxx.sql:12316: ERROR: relation “ix_uq_folders_session_id” already exists
psql:xxxxx.sql:12323: ERROR: relation “ix_uq_folders_subcontribution_id” already exists
psql:xxxxx.sql:12330: ERROR: relation “ix_categories_default_badge_template_id” already exists
psql:xxxxx.sql:12337: ERROR: relation “ix_categories_default_ticket_template_id” already exists
psql:xxxxx.sql:12344: ERROR: relation “ix_categories_parent_id” already exists
psql:xxxxx.sql:12351: ERROR: relation “ix_categories_title_fts” already exists
psql:xxxxx.sql:12358: ERROR: relation “ix_event_move_requests_category_id” already exists
psql:xxxxx.sql:12365: ERROR: relation “ix_event_move_requests_event_id” already exists
psql:xxxxx.sql:12372: ERROR: relation “ix_event_move_requests_requestor_id” already exists
psql:xxxxx.sql:12379: ERROR: relation “ix_legacy_id_map_category_id” already exists
psql:xxxxx.sql:12386: ERROR: relation “ix_legacy_id_map_legacy_category_id” already exists
psql:xxxxx.sql:12393: ERROR: relation “ix_logs_category_id” already exists
psql:xxxxx.sql:12400: ERROR: relation “ix_logs_meta” already exists
psql:xxxxx.sql:12407: ERROR: relation “ix_logs_user_id” already exists
psql:xxxxx.sql:12414: ERROR: relation “ix_principals_category_id” already exists
psql:xxxxx.sql:12421: ERROR: relation “ix_principals_category_role_id” already exists
psql:xxxxx.sql:12428: ERROR: relation “ix_principals_ip_network_group_id” already exists
psql:xxxxx.sql:12435: ERROR: relation “ix_principals_local_group_id” already exists
psql:xxxxx.sql:12442: ERROR: relation “ix_principals_mp_group_provider_mp_group_name” already exists
psql:xxxxx.sql:12449: ERROR: relation “ix_principals_user_id” already exists
psql:xxxxx.sql:12456: ERROR: relation “ix_role_members_role_id” already exists
psql:xxxxx.sql:12463: ERROR: relation “ix_role_members_user_id” already exists
psql:xxxxx.sql:12470: ERROR: relation “ix_roles_category_id” already exists
psql:xxxxx.sql:12477: ERROR: relation “ix_settings_category_id” already exists
psql:xxxxx.sql:12484: ERROR: relation “ix_settings_category_id_module” already exists
psql:xxxxx.sql:12491: ERROR: relation “ix_settings_category_id_module_name” already exists
psql:xxxxx.sql:12498: ERROR: relation “ix_settings_module” already exists
psql:xxxxx.sql:12505: ERROR: relation “ix_settings_name” already exists
psql:xxxxx.sql:12512: ERROR: relation “ix_uq_event_move_requests_event_id” already exists
psql:xxxxx.sql:12519: ERROR: relation “ix_uq_principals_local_group” already exists
psql:xxxxx.sql:12526: ERROR: relation “ix_uq_principals_mp_group” already exists
psql:xxxxx.sql:12533: ERROR: relation “ix_uq_principals_user” already exists
psql:xxxxx.sql:12540: ERROR: relation “ix_uq_roles_category_id_code” already exists
psql:xxxxx.sql:12547: ERROR: relation “ix_abstract_comments_abstract_id” already exists
psql:xxxxx.sql:12554: ERROR: relation “ix_abstract_comments_modified_by_id” already exists
psql:xxxxx.sql:12561: ERROR: relation “ix_abstract_comments_user_id” already exists
psql:xxxxx.sql:12568: ERROR: relation “ix_abstract_field_values_abstract_id” already exists
psql:xxxxx.sql:12575: ERROR: relation “ix_abstract_field_values_contribution_field_id” already exists
psql:xxxxx.sql:12582: ERROR: relation “ix_abstract_person_links_abstract_id” already exists
psql:xxxxx.sql:12589: ERROR: relation “ix_abstract_person_links_affiliation_id” already exists
psql:xxxxx.sql:12596: ERROR: relation “ix_abstract_person_links_person_id” already exists
psql:xxxxx.sql:12603: ERROR: relation “ix_abstract_review_questions_event_id” already exists
psql:xxxxx.sql:12610: ERROR: relation “ix_abstract_review_ratings_question_id” already exists
psql:xxxxx.sql:12617: ERROR: relation “ix_abstract_review_ratings_review_id” already exists
psql:xxxxx.sql:12624: ERROR: relation “ix_abstract_reviews_abstract_id” already exists
psql:xxxxx.sql:12631: ERROR: relation “ix_abstract_reviews_proposed_contribution_type_id” already exists
psql:xxxxx.sql:12638: ERROR: relation “ix_abstract_reviews_proposed_related_abstract_id” already exists
psql:xxxxx.sql:12645: ERROR: relation “ix_abstract_reviews_track_id” already exists
psql:xxxxx.sql:12652: ERROR: relation “ix_abstract_reviews_user_id” already exists
psql:xxxxx.sql:12659: ERROR: relation “ix_abstracts_accepted_contrib_type_id” already exists
psql:xxxxx.sql:12666: ERROR: relation “ix_abstracts_accepted_track_id” already exists
psql:xxxxx.sql:12673: ERROR: relation “ix_abstracts_duplicate_of_id” already exists
psql:xxxxx.sql:12680: ERROR: relation “ix_abstracts_event_id” already exists
psql:xxxxx.sql:12687: ERROR: relation “ix_abstracts_judge_id” already exists
psql:xxxxx.sql:12694: ERROR: relation “ix_abstracts_merged_into_id” already exists
psql:xxxxx.sql:12701: ERROR: relation “ix_abstracts_modified_by_id” already exists
psql:xxxxx.sql:12708: ERROR: relation “ix_abstracts_submitted_contrib_type_id” already exists
psql:xxxxx.sql:12715: ERROR: relation “ix_abstracts_submitter_id” already exists
psql:xxxxx.sql:12722: ERROR: relation “ix_email_logs_abstract_id” already exists
psql:xxxxx.sql:12729: ERROR: relation “ix_email_logs_email_template_id” already exists
psql:xxxxx.sql:12736: ERROR: relation “ix_email_logs_user_id” already exists
psql:xxxxx.sql:12743: ERROR: relation “ix_email_templates_event_id” already exists
psql:xxxxx.sql:12750: ERROR: relation “ix_files_abstract_id” already exists
psql:xxxxx.sql:12757: ERROR: relation “ix_proposed_for_tracks_review_id” already exists
psql:xxxxx.sql:12764: ERROR: relation “ix_proposed_for_tracks_track_id” already exists
psql:xxxxx.sql:12771: ERROR: relation “ix_reviewed_for_tracks_abstract_id” already exists

Obviously you need to restore it into an empty database… Also I recommend using pg_dump -Fc for a better dump format. You’d use pg_restore to restore it btw, not psql.

Sir any cronjob exits for sample.

My objective is to test this complete process.

What? I have no clue what you are trying to tell me.

If you want to rest a restore, do that on another machine…

Is there any documentation technical document about database schema .

No. You can read the code or look for one of the tools that probably exist to create schema docs from an existing database and its foreign keys.