Backup command

This commit is contained in:
Dreamgineer
2025-10-18 09:20:16 -04:00 Unverified
parent 360858e8cf
commit 24b63fe47a
+8
View File
@@ -0,0 +1,8 @@
sudo echo "Root obtained."
echo Backing up
cd ~superdinmc/kpspnextgen
docker compose exec -it db bash -c "pg_dumpall -h localhost -p 5432 -U postgres > /pgdata/cluster.sql"
echo -n "Copying backup file to "
cd -
sudo cp /var/lib/docker/volumes/kpspnextgen_pgdata/_data/cluster.sql ./cluster.sql
sudo chown superdinmc:users ./cluster.sql