1
0
Fork 0
This repository has been archived on 2022-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
odoo-pos-distribution/backup/resticbackup.sh

15 lines
286 B
Bash
Executable File

#!/usr/bin/env bash
set -x
echo "[$(date)] Starting backup"
# Dump Postgres DB - parameters are read from env vars
pg_dump -Fc > /data/odoo_data.dump
# Backup data with restic
restic backup --hostname posbox /data
restic forget --prune --keep-last 10
echo "[$(date)] Backup ended"