50 lines
1.1 KiB
Markdown
50 lines
1.1 KiB
Markdown
# 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
|
|
```
|
|
|
|
---
|
|
|