forked from toolshed/docs.coopcloud.tech
		
	Add manual DB backup instructions
This commit is contained in:
		@ -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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user