Class: Backy::PgDump
- Inherits:
-
Object
- Object
- Backy::PgDump
- Defined in:
- lib/backy/pg_dump.rb
Constant Summary collapse
- DUMP_DIR =
"db/dump"- DUMP_CMD_OPTS =
"--no-acl --no-owner --no-subscriptions --no-publications"
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/backy/pg_dump.rb', line 13 def call setup_backup_directory log_start dump_file = nil @replication_resumed = false begin handle_replication { dump_file = backup } rescue => e Logger.error("An error occurred during backup: #{e.message}") ensure # Only resume if not already resumed (single core path resumes early) log_replication_resume if replica? && pause_replication? && !@replication_resumed end dump_file end |