Complete the command to create a backup of a Docker volume named 'data_volume'.
docker run --rm -v data_volume:/data -v $(pwd):/backup busybox tar [1] -cvf /backup/data_backup.tar /dataThe -cvf option in tar creates a new archive file. Here, it creates a backup archive of the volume.
Complete the command to restore a Docker volume from a backup file named 'data_backup.tar'.
docker run --rm -v data_volume:/data -v $(pwd):/backup busybox tar [1] -xvf /backup/data_backup.tar -C /dataThe -xvf option extracts files from the archive. This restores the volume data from the backup.
Fix the error in the command to backup a Docker container's filesystem to a tar file.
docker export [1] > container_backup.tarThe docker export command requires a container ID or name, not an image or volume name.
Fill the blank to create a backup of a Docker volume named 'app_data' into a compressed tar file.
docker run --rm -v app_data:/data -v $(pwd):/backup busybox tar [1] -czvf /backup/app_data_backup.tar.gz /dataThe -czvf option creates a compressed gzip archive of the volume. The z enables gzip compression.
Fill both blanks to restore a compressed backup 'app_data_backup.tar.gz' into a Docker volume named 'app_data'.
docker run --rm -v app_data:/data -v $(pwd):/backup busybox tar [1] -xzvf /backup/app_data_backup.tar.gz -C [2]
The -xzvf option extracts a gzip compressed archive. /data is the target directory inside the container where the volume is mounted.