You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567
  1. #!/bin/bash
  2. NOW=$(date +"%Y%m%dT%H%M%SZ")
  3. DUMP_FILENAME="$NOW"_lesspass_db.sql
  4. docker exec -it lesspass_db_1 sh -c 'PGPASSWORD=$POSTGRES_PASSWORD pg_dumpall -U $POSTGRES_USER -h localhost -p 5432 --clean --file='$DUMP_FILENAME''
  5. docker cp lesspass_db_1:$DUMP_FILENAME .
  6. docker exec -it lesspass_db_1 rm $DUMP_FILENAME
  7. echo $DUMP_FILENAME