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) <wkqwu@cn.ibm.com>
Upstream-commit: 83c705c00d9be3d5064a7a3fcc5de0645fce21b1
Component: engine
This commit is contained in:
Kai Qiang Wu(Kennan)
2015-12-24 03:09:59 +00:00
parent e16a7b429c
commit 479e415aa9

View File

@ -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.