The data backup operation is very easy. Execute the following command:
Command Explanation: First, use --volumes-from to connect to the container to be backed up. The -v parameter is used to mount the current directory to the /backup directory of the container. Next, back up the contents of the /usr/share/nginx/html directory in the container to the backup.tar file in the /backup directory. Since the current directory has been mapped to the /backup directory of the container, the compressed files backed up in the /backup directory of the container can be immediately seen in the current directory. The execution results are as follows: recover Create a container First, create a container. This container is the container that will use the recovered data. I will create an nginx container as follows: Create a container named nginx3 and mount a data volume. recover Data recovery requires a temporary container, as follows: Command Explanation: First, use the --volumes-from parameter to connect to the backup container, which is nginx3 created in the first step. Then map the current directory to the /backup directory of the container. Then perform the decompression operation to decompress the backup.tar file. The decompressed file location description is an address within the container, but this address has been mapped to the current directory in the host machine, so the file to be decompressed here is actually the file in the current directory of the host machine. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue implements the method of displaying percentage of echart pie chart legend
>>: Implementation of MySQL select in subquery optimization
This article shares the specific code of Vue usin...
Table of contents Congruent and Incongruent congr...
This article mainly describes two kinds of underl...
1. TCP Wrappers Overview TCP Wrappers "wraps...
Table of contents 1. Auxiliary functions 2. Examp...
Introduction: When using MySQL to create a table,...
1. It is best to add a sentence like this before t...
1. Introduction The EXPLAIN statement provides in...
You can save this logo locally as a .rar file and...
Today we are going to make origami airplanes (the...
Table of contents 1 Create configuration and data...
Table of contents Boolean Type Number Types Strin...
Brief description <br />In IE6 and 7, in a ...
When I switched my primary operating system from ...
Regardless of which version of Ubuntu, installing...