forked from toolshed/docs.coopcloud.tech
		
	backup & restore docs
This commit is contained in:
		@ -489,3 +489,44 @@ visibility for other co-op hosters & end-users.
 | 
			
		||||
For now, it is best to [get in touch](https://docs.coopcloud.tech/intro/contact/) if you want to add your recipe to the catalogue.
 | 
			
		||||
 | 
			
		||||
In the future, we'd like to support [multiple catalogues](https://git.coopcloud.tech/coop-cloud/organising/issues/139).
 | 
			
		||||
 | 
			
		||||
## How do I configure backup/restore?
 | 
			
		||||
 | 
			
		||||
From the perspective of the recipe maintainer, backup/restore is just more
 | 
			
		||||
`deploy: ...` labels. Tools can read these labels and then perform the
 | 
			
		||||
backup/restore logic.
 | 
			
		||||
 | 
			
		||||
### Tools
 | 
			
		||||
 | 
			
		||||
Two of the current "blessed" options are
 | 
			
		||||
[`backup-bot-two`](https://git.coopcloud.tech/coop-cloud/backup-bot-two) &
 | 
			
		||||
[`abra`](https://git.coopcloud.tech/coop-cloud/abra).
 | 
			
		||||
 | 
			
		||||
#### `abra`
 | 
			
		||||
 | 
			
		||||
`abra` will read labels and store backups in `~/.abra/backups/...`.
 | 
			
		||||
 | 
			
		||||
#### `backup-bot-two`
 | 
			
		||||
 | 
			
		||||
Please see the [`README.md`](https://git.coopcloud.tech/coop-cloud/backup-bot-two#backupbot-ii) for the full docs.
 | 
			
		||||
 | 
			
		||||
### Backup
 | 
			
		||||
 | 
			
		||||
For backup, here are the labels & some examples:
 | 
			
		||||
 | 
			
		||||
- `backupbot.backup=true`: turn on backup logic
 | 
			
		||||
- `backupbot.backup.pre-hook=mysqldump -u root -pghost ghost --tab /var/lib/foo`: command to run before backing up
 | 
			
		||||
- `backupbot.backup.post-hook=rm -rf /var/lib/mysql-files/*`: command to run after backing up
 | 
			
		||||
- `backupbot.backup.path=/var/lib/foo,/var/lib/bar`: paths to back up
 | 
			
		||||
 | 
			
		||||
You place these on your recipe configuration and then tools can run backups.
 | 
			
		||||
 | 
			
		||||
### Restore
 | 
			
		||||
 | 
			
		||||
Restore, in this context means, "moving a compressed archive back to the
 | 
			
		||||
container backup paths". So, if you set
 | 
			
		||||
`backupbot.backup.path=/var/lib/foo,/var/lib/bar` and you have a backed up
 | 
			
		||||
archive, tooling will unzip files in the archive back to those paths.
 | 
			
		||||
 | 
			
		||||
In the case of restoring database tables, you can use the `pre-hook` &
 | 
			
		||||
`post-hook` commands to run the insertion logic.
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user