Add readme.

This commit is contained in:
redxef 2022-08-30 22:44:38 +02:00
parent b9da9c74c4
commit 9fe2f05491
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

39
README.md Normal file
View file

@ -0,0 +1,39 @@
# Docker Volume Backup
A simple script which creates tarballs from docker volumes and restores
them.
## Usage
### Backup a single volume
`./dvbackup.sh backup <volume_name> <path/to/tarball.tar>`
Creates a tarball from the contents of the volume.
### Restore a single volume
`./dvbackup.sh restore <path/to/tarball.tar> <volume_name>`
Restores the tarball into the volume. *This is destructive*, all old
contents will be removed from the volume. The volume must already exist.
### Backup all named volumes
`./dvbackup.sh backup_all`
Creates backups from all volumes which do not only contain the character
set `[0-9a-f]`.
This command will output a `<volume_name>.tar` file for every found
volume in the current working directory.
### Restore volumes
`./dvbackup.sh restore_all [volume.tar...]`
Restores all given tarballs into their respective volumes. The volumes
must already exist and the operation is *destructive* in the same way
as the `restore` operation. The default behaviour is to ask before
continuing, this can be overridden by setting `DVB_I_KNOW_WHAT_I_DO=y`.
Volumes can be created implicitly by setting `DVB_CREATE_VOLUME=y`.