Sha256: b1a081e60106684ac6af490f8a6a0134fa9bd8fe7e85f7d39378246fe142f422
Contents?: true
Size: 812 Bytes
Versions: 8
Compression:
Stored size: 812 Bytes
Contents
# typed: true # frozen_string_literal: true class OpsBackups::BackupDbJob < ApplicationJob queue_as :operations # perform a full backup of the database # @param tag [String] the tag to assign to the backup # @param exclude_tables [Array<String>] the list of tables to exclude from the backup # @param cleanup_policy [String] the cleanup policy to apply to the backup, one of "retain_tiered_cleanup_policy" or "retain_last_limit_cleanup_policy" def perform(options = {}) exclude_tables = options[:exclude_tables] || [] tag = options[:tag] || (exclude_tables.empty? ? "db_pg_full" : "db_pg_partial") cleanup = options[:cleanup] OpsBackups::Backup.new.db_pg_backup(exclude_tables:, tag:) OpsBackups::Backup.send("#{cleanup}_cleanup_policy", tag: tag) if cleanup.present? end end
Version data entries
8 entries across 8 versions & 1 rubygems