Skip to content

Commit

Permalink
run the db backup via restic, not as a separate cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Sep 8, 2023
1 parent 23157ca commit 5590acf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions puppet/modules/profiles/manifests/redmine.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
# TODO include redmine
$backup_path = '/var/lib/redmine'

include profiles::backup::sender
class {'profiles::backup::sender':
username => $redmine::username,
}

restic::repository { 'redmine':
backup_cap_dac_read_search => true,
backup_path => $backup_path,
backup_flags => ['--exclude', "${backup_path}/git"],
backup_path => $backup_path,
backup_flags => ['--exclude', "${backup_path}/git"],
backup_pre_cmd => "pg_dump redmine | gzip > ${backup_path}/redmine.backup.sql.gz",
user => $redmine::username,
}
}
1 change: 0 additions & 1 deletion puppet/modules/redmine/templates/cron.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@hourly <%= @username %> /usr/local/bin/redmine_repos.sh <%= @app_root %> <%= @data_dir %>
@daily <%= @username %> pg_dump <%= @db_name %> | gzip > <%= @data_dir %>/redmine.backup.sql.gz

0 comments on commit 5590acf

Please sign in to comment.