Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now actually importing into volume rather than /. #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arjen-hoogesteger
Copy link

No description provided.

@Guiorgy
Copy link
Contributor

Guiorgy commented Feb 7, 2024

To explain what this PR does, currently vackup export produces a tar file with a vackup-volume directory where all the contents of the desired volume are inside that directory, e.g.:

$ tar -ztvf mosquitto_config.tar.gz
vackup-volume/
vackup-volume/mosquitto.conf

This PR simply skips the inclusion of this extra directory in the tar file (and handles the import accordingly):

$ tar -ztvf mosquitto_config.tar.gz
/
/mosquitto.conf

Note: Needless to say, since this changes the structure of the archive, any backups made before this change would not be correctly restored! However, since this is a simple change, you can manually update old archives, e.g.:

mkdir tmp # create a temporary directory
tar -xvzf ./mosquitto_config.tar.gz -C ./tmp # extract the archive into the temporary directory
rm ./mosquitto_config.tar.gz # delete the old archive
tar -zcvf ./mosquitto_config.tar.gz -C ./tmp/vackup-volume . # recreate the archive while skipping the vackup-volume directory
rm -rf ./tmp/ # delete the temporary directory

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.

2 participants