我正在使用Docker将此代码docker checkpoint create --checkpoint-dir=s3://bucket-name/ --leave-running=true container_2 checkpoint2
保存在AWS S3上,我正在创建一个名为checkpoint2的检查点,但是当我访问Bucket时不显示checkpoint2时,如何将该检查点2发送到s3?
答案 0 :(得分:0)
您可以使用criu-image-streamer连接到S3。
检查点:
sleep 10 & # The app to be checkpointed
APP_PID=$!
# The 'exec N>' syntax opens a new file descriptor in bash (not sh, not zsh).
exec 10> >(lz4 - - | aws s3 cp - s3://bucket/img-1.lz4)
exec 11> >(lz4 - - | aws s3 cp - s3://bucket/img-2.lz4)
exec 12> >(lz4 - - | aws s3 cp - s3://bucket/img-3.lz4)
criu-image-streamer --images-dir /tmp --shard-fds 10,11,12 capture &
criu dump --images-dir /tmp --stream --shell-job --tree $APP_PID
还原:
exec 10< <(aws s3 cp s3://bucket/img-1.lz4 - | lz4 -d - -)
exec 11< <(aws s3 cp s3://bucket/img-2.lz4 - | lz4 -d - -)
exec 12< <(aws s3 cp s3://bucket/img-3.lz4 - | lz4 -d - -)
criu-image-streamer --shard-fds 10,11,12 --images-dir /tmp serve &
criu restore --images-dir /tmp --stream --shell-job