mirror of
https://github.com/prodrigestivill/docker-postgres-backup-local.git
synced 2026-05-31 08:37:58 +00:00
Added verbose
This commit is contained in:
@@ -56,8 +56,8 @@ for DB in $(echo $POSTGRES_DB | tr , " "); do
|
||||
#Copy (hardlink) for each entry
|
||||
ln -vf "$DFILE" "$WFILE"
|
||||
ln -vf "$DFILE" "$MFILE"
|
||||
|
||||
#Clean old files
|
||||
echo "Cleaning older than ${KEEP_DAYS} days for ${DB} database from ${POSTGRES_HOST}..."
|
||||
find "$BACKUP_DIR/daily" -maxdepth 1 -mtime +$KEEP_DAYS -name "$DB-*.sql*" -exec rm -rf '{}' ';'
|
||||
find "$BACKUP_DIR/weekly" -maxdepth 1 -mtime +$KEEP_WEEKS -name "$DB-*.sql*" -exec rm -rf '{}' ';'
|
||||
find "$BACKUP_DIR/monthly" -maxdepth 1 -mtime +$KEEP_MONTHS -name "$DB-*.sql*" -exec rm -rf '{}' ';'
|
||||
|
||||
Reference in New Issue
Block a user