Skip to content

Commit

Permalink
delete old backups before making new one
Browse files Browse the repository at this point in the history
  • Loading branch information
angaz committed Jul 4, 2024
1 parent 070ad51 commit 8c8c0dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@
mkdir -p "${cfg.snapshotDirname}"
find "${cfg.snapshotDirname}" -mtime +${toString cfg.dailyBackupRetention} -name '*.pgdump' -delete
dump_name="${cfg.snapshotDirname}/nodecrawler_$(date --utc +%Y%m%dT%H%M%S).pgdump"
pg_dump \
Expand All @@ -467,8 +469,6 @@
nodecrawler
mv "''${dump_name}.part" "''${dump_name}"
find "${cfg.snapshotDirname}" -mtime +${toString cfg.dailyBackupRetention} -name '*.pgdump' -delete
'';
};
};
Expand Down

0 comments on commit 8c8c0dc

Please sign in to comment.