adding backupdir variable to db rotate
This commit is contained in:
parent
497d530f64
commit
32a74c611c
|
@ -9,7 +9,7 @@ backup_dir="$HOME/backup"
|
|||
docker exec postgres pg_dump -U aqi | gzip > "$backup_dir/pg_$time_stamp.gz"
|
||||
|
||||
# rotate
|
||||
find backup/ -type f -name "pg_*.gz" | sort -r | tail -n +15 | xargs --no-run-if-empty trash
|
||||
find "$backup_dir" -type f -name "pg_*.gz" | sort -r | tail -n +15 | xargs --no-run-if-empty trash
|
||||
|
||||
# log
|
||||
log_file="$backup_dir/pg_status.log"
|
||||
|
|
Loading…
Reference in New Issue