add ubuntu
parent
bcecd80874
commit
aac9d4799e
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
@ -0,0 +1,23 @@
|
||||
# Бекап баз данных
|
||||
|
||||
## PostgreSQL
|
||||
|
||||
Backup your databases
|
||||
```
|
||||
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql`
|
||||
```
|
||||
Restore your databases
|
||||
```
|
||||
cat your_dump.sql | docker exec -i your-db-container psql -U postgres
|
||||
```
|
||||
|
||||
## MySQL/MariaDB
|
||||
|
||||
Backup your databases
|
||||
```
|
||||
docker exec -t your-db-container mysqldump -u root -p <db> | gzip > wpbackup.sql.gz
|
||||
```
|
||||
Restore your databases
|
||||
```
|
||||
docker exec -t your-db-container mysqldump -u root -p <db> < wpbackup.sql
|
||||
```
|
Loading…
Reference in New Issue