Files
obsidian/Geschäft/IT/Postgres.md
T

1.3 KiB

Backup/Dump

Im Verzeichnis von Postgres ausführen: ````

cd "C:\Program Files\PostgreSQL\16\bin"

Folgenden Befehl ausführen

pg_dump.exe -U USER -d DATABASE_NAME -f c:\test.dump

Spicy Storage Backup:

.\pg_dump.exe -U matthias -d spicy_storage -f 'K:\Nextcloud\Lodner\Geschäftlich\Lodner Geschmackswelten\Datenbank Sicherungen\Postgres\003 - 2024-07-12_0109 - spicy_storage.dump'

Surface

.\pg_dump.exe -U matthias -d spicy_storage -f 'C:\Users\matth\Nextcloud\Geschäftlich\Lodner Geschmackswelten\Datenbank Sicherungen\Postgres\VERSION - spicy_storage.dump'

Restore

Im Verzeichnis von Postgres ausführen: ````

cd "C:\Program Files\PostgreSQL\16\bin"
psql.exe -U USER -f C:\test.dump DATABASE_NAME

Create empty database then run command.

Spicy Storage Backup einspielen:

.\psql.exe -U matthias -f 'K:\Nextcloud\Lodner\Geschäftlich\Lodner Geschmackswelten\Datenbank Sicherungen\Postgres\VERSION - spicy_storage.dump' spicy_storage

Surface

.\psql.exe -U matthias -f 'C:\Users\matth\Nextcloud\Geschäftlich\Lodner Geschmackswelten\Datenbank Sicherungen\Postgres\VERSION' spicy_storage

pg_restore -h localhost -p 5432 -U matthias -d label_editor -v 'C:\Users\matth\Downloads\Lodner_-_Label_Editor_backup_2026-07-20_11-45-19.dump'