2
0
Fork 0

various changes

main
Ducky 2022-02-23 06:00:06 +00:00
parent 3d8dc99d26
commit 04082eae76
1 changed files with 4 additions and 4 deletions

View File

@ -1,16 +1,16 @@
#!/bin/bash
sql_dump_dir="/srv/store/common/sql"
postgres_dump_file="/srv/common/sql/postgres_$host.sql"
postgres_dump_file="/srv/store/common/sql/postgres_$host.sql"
postgres_password="5H4bsfAVXGFQFYfpPzDtcYpUXB8vjQUT"
mkdir -p $sql_dump_dir
touch $postgres_dump_file
chmod -R 660 $sql_dump_dir
chown -R root:root $sql_dump_dir
say "Photoprism: Importing media..."
podman exec -it photoprism photoprism import
say "Postgres: Dumping database to '$postgres_dump_file'..."
podman exec -i -e PGPASSWORD=$postgres_password postgres /usr/local/bin/pg_dumpall -U postgres > $postgres_dump_file
chmod -R 660 $sql_dump_dir
chown -R root:root $sql_dump_dir