From 9fe2f054915830b4fe31bcd0c9a2924bf1bb07da Mon Sep 17 00:00:00 2001 From: redxef Date: Tue, 30 Aug 2022 22:44:38 +0200 Subject: [PATCH] Add readme. --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..20b3b60 --- /dev/null +++ b/README.md @@ -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 ` + +Creates a tarball from the contents of the volume. + +### Restore a single volume + +`./dvbackup.sh restore ` + +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 `.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`.