Skip to content
Snippets Groups Projects

dump_instance.sh and load_instance.sh scripts

Merged Maciej Krzeminski requested to merge mkrzeminski/haf_pg_dump_restore into develop

Issue #65 - Prepare regression test covering database backup/restore

Issue #4 use database backup to restore HAF

The scripts save or load the haf database along with the hived state.


OPTIONS:
  --backup-dir=DIR                 Allows to specify where the dumps are located, required
  --hived-executable-path=PATH     Allows to specify where the main executable is located, required
  --hived-data-dir=DIR             Allows to specify where node data is located, required
  --haf-db-name=NAME               Allows to specify a name of database to store HAF data, required
  --haf-db-admin=NAME              Allows to specify a name of database admin role having permission to create the database
  --haf-db-host=VALUE              Allows to specify a PostgreSQL host location
  --haf-db-port=NUMBER             Allows to specify a PostgreSQL operating port
  --haf-db-jobs=NUMBER             Allows to specify how many processes are run during dump/restore
  --override-existing-backup-dir   Erases backup directory and its contents
  --help                           Display this help screen and exit

A note using Docker: hivemind SELECT * on hivemind_app view issues an error "could not resize shared memory segment" . Fixed by adding --shm-size=2gb to the docker run command.

Edited by Maciej Krzeminski

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

    • Resolved by Mateusz Żebrak

      Overall:

      • Please use type hinting for function signatures if possible (it has many benefits). You could do something like:
      from __future__ import annotations
      
      from typing import TYPE_CHECKING
      
      if TYPE_CHECKING:
          from sqlalchemy... import Session
          <other imports used only in type checking>
  • Maciej Krzeminski marked this merge request as draft

    marked this merge request as draft

  • Maciej Krzeminski marked this merge request as ready

    marked this merge request as ready

  • Maciej Krzeminski changed the description

    changed the description

  • mentioned in commit 064a34e1

  • mentioned in commit 1c8a5b3f

  • mentioned in commit 2b098066

  • mentioned in commit 9fb9687e

  • mentioned in commit ece5b0f8

  • mentioned in commit 51608382

  • mentioned in commit 4e91d814

  • added 8 commits

    • 1c8a5b3f - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112264
    • 6d7b7a09 - Eliminate third stage of restore , because actually post-data is not needed
    • 2b098066 - https://gitlab.syncad.com/hive and...
    • 9fb9687e - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112268
    • 064a34e1 - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112269
    • ece5b0f8 - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112270
    • 51608382 - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112272
    • 4e91d814 - https://gitlab.syncad.com/hive/haf/-/merge_requests/194#note_112266

    Compare with previous version

  • added 2 commits

    Compare with previous version

  • added 2 commits

    Compare with previous version

  • Mateusz Żebrak
  • Mateusz Żebrak
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading