From 83c705c00d9be3d5064a7a3fcc5de0645fce21b1 Mon Sep 17 00:00:00 2001 From: "Kai Qiang Wu(Kennan)" Date: Thu, 24 Dec 2015 03:09:59 +0000 Subject: [PATCH] Fix the restore data example Fixes: #18872 For backup, restore case, we usually restore in same directory, so when we untar it, we not need go to /dbdata directory, wich could result in /dbdata/dbdata, this fix make it untar directly. The directory /dbdata would be same as old container /dbdata. Signed-off-by: Kai Qiang Wu(Kennan) --- docs/userguide/dockervolumes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/dockervolumes.md b/docs/userguide/dockervolumes.md index 2a12f19596..776478a22e 100644 --- a/docs/userguide/dockervolumes.md +++ b/docs/userguide/dockervolumes.md @@ -263,7 +263,7 @@ elsewhere. Create a new container. Then un-tar the backup file in the new container's data volume. - $ docker run --rm --volumes-from dbstore2 -v $(pwd):/backup ubuntu bash -c "cd /dbdata && tar xvf /backup/backup.tar" + $ docker run --rm --volumes-from dbstore2 -v $(pwd):/backup ubuntu bash -c "cd /dbdata && tar xvf /backup/backup.tar --strip 1" You can use the techniques above to automate backup, migration and restore testing using your preferred tools.