Verified Commit a198c455 authored by Luc Didry's avatar Luc Didry

Create the database dump from backup script

parent 4ce697ad
Pipeline #131923 passed with stages
in 40 seconds
......@@ -5,6 +5,10 @@ target='/var/www/peertube/daily_backups/borg/'
src='/var/www/peertube/'
exclude='-e /var/www/peertube/daily_backups/borg/ -e /var/www/peertube/storage/tmp/ -e /var/www/peertube/storage/cache/'
## Backup the database
## Dump of peertube_prod database, suitable for pg_restore
pg_dump --format custom -f /var/www/peertube/daily_backups/postgresql/peertube_prod.$(date +%A).bak -d peertube_prod
## Show me the backups
$borg list $target
......
......@@ -186,13 +186,6 @@ certificate_monitoring:
file.directory:
- dir_mode: 750
- user: postgres
pg_dump:
cron.present:
- name: pg_dump --format custom -f /var/www/peertube/daily_backups/postgresql/peertube_prod.$(date +%A).bak -d peertube_prod
- user: postgres
- comment: Dump of peertube_prod database, suitable for pg_restore
- minute: 42
- hour: 1
# Backup with borg
borgbackup:
......@@ -212,7 +205,7 @@ backup_script:
- user: root
- comment: Backup Peertube on borg
- minute: 42
- hour: 2
- hour: 1
{% if settings.apticron is defined and settings.apticron.enabled%}
#############################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment