Skip to content

Conversation

harmv
Copy link

@harmv harmv commented Feb 17, 2023

When using docker_clone_volume.sh, I found that when copying a volume with influxdb data, the clones image was bigger than the original.

cause: alpine base image contains a cp version (busybox) which does not preserve hardlinks, even with the -a option.

This is fixed by using an ubuntu base image instead of alpine.

downside: ubuntu image is larger to download than alpine. (~ 80MB vs 7 MB)

Source volume:

influxdb_data 380.2 MB

Before (busybox cp):

influxdb_data.bak 443.5 MB

After (ubuntu cp):

influxdb_data.ubuntu.bak 380.2 MB

NB: this pull request is not about size, but rather about correctness. A clone should be identical. Not preserving hard links, might actually break apps that depend on it. (like the influxdb database mentioned above)

When using docker_clone_volume.sh,  I found that when copying a volume with influxdb data,
the clones image was bigger than the original.

cause: alpine base image contains a cp version (busybox) which  does _not_ preserve
hardlinks, even with the -a option.

This is fixed by using an ubuntu base image instead of alpine.

downside: ubuntu image is larger than alpine.

Source volume:

 influxdb_data               380.2 MB

Before:

 influxdb_data.bak           443.5 MB

After:

 influxdb_data.ubuntu.bak    380.2 MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant