Add manual DB backup instructions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
18d1d6a108
commit
e630ebc035
@ -331,3 +331,26 @@ If you're app [supports backup/restore](/handbook/#how-do-i-configure-backuprest
|
||||
|
||||
With `abra`, you can simply run `abra app backup ...` & `abra app restore ...`.
|
||||
Pass `-h` for more information on the specific flags & arguments.
|
||||
|
||||
## How do I take a manual database backup?
|
||||
|
||||
MySQL / MariaDB:
|
||||
|
||||
```
|
||||
abra app run foo.bar.com db mysqldump -u root <database> | gzip > ~/.abra/backups/foo.bar.com_db_`date +%F`.sql.gz
|
||||
```
|
||||
|
||||
Postgres:
|
||||
|
||||
```
|
||||
abra app run foo.bar.com db pg_dump -u root <database> | gzip > ~/.abra/backups/foo.bar.com_db_`date +%F`.sql.gz
|
||||
```
|
||||
|
||||
If you get errors about database access:
|
||||
- Make sure you've specified the right database user (`root` above) and db name
|
||||
- If you have a database password set, you might need to load it from a secret,
|
||||
something like this:
|
||||
|
||||
```
|
||||
abra app run foo.bar.com db bash -c 'mysqldump -u root -p"$(cat /run/secrets/db_oot_password)" <database>' | gzip > ~/.abra/backups/foo.bar.com_db_`date +%F`.sql.gz
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user