Skip to content

Commit a0009ba

Browse files
committed
Keep the last old sql dump.
1 parent f49893a commit a0009ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

postgres/dumpdb.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
docker exec postgres sh -c 'exec pg_dumpall -U postgres -c ' >dbdump.psqldump
1+
#!/bin/sh
2+
SQLDUMP=dbdump.psqldump
3+
if test -f $SQLDUMP
4+
then
5+
mv $SQLDUMP ${SQLDUMP}.old
6+
fi
7+
docker exec postgres sh -c 'exec pg_dumpall -U postgres -c ' >$SQLDUMP

0 commit comments

Comments
 (0)