6.3 Backup container data

Information

Take regular backups of your container data volumes.

Rationale:

Containers might run services that are critical for your business. Taking regular databackups would ensure that if there is ever any loss of data you would still have your data in backup. The loss of data could be devastating for your business.
NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

You should follow your organization's policy for data backup. You can take backup of your container data volume using '--volumes-from' parameter as below:

$> docker run <Run arguments> --volumes-from $INSTANCE_ID -v [host-dir]:[container-dir] <Container Image Name or ID> <Command>

For example,

docker run --volumes-from 699ee3233b96 -v /mybackup:/backup centos tar cvf /backup/backup.tar /exampledatatobackup

Impact:

None.


Default Value:

By default, no data backup happens for container data volumes.

See Also

https://workbench.cisecurity.org/files/1476