Browse Source

added help message to readme

Josh Bicking 7 years ago
parent
commit
93f979aa4b
1 changed files with 21 additions and 0 deletions
  1. 21 0
      README.md

+ 21 - 0
README.md

@@ -1,2 +1,23 @@
 # docker-backup.sh
 Stop, export, compress, and restart docker containers.
+
+ docker-backup.sh stops all running containers, exports them and gzips them to the
+    current directory, then restarts the previously running containers in the reverse
+    order of which they were stopped.
+
+    This script assumes it is being run as root, or the current user is in the docker group.
+
+    Usage: ./docker-backup.sh [args]
+
+    -a    Backup all containers, not just running containers. Only running containers will be
+          restarted after backup (unless otherwise specified by -n)
+
+    -h    Print this help message.
+
+    -n    Don't restart containers after backup
+
+    -o OUTDIR    Backups are sent to OUTDIR, rather than the current directory
+
+    -v VOLUME (-v SECONDVOLUME -v THIRDVOLUME...)]
+            Include volume directories with your backup. These are made once the container is
+            stopped to avoid corruption.