Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hej,
I would like to contribute a plugin that handles big files (mainly disk images) better.
Problem with disk image is that they need to be transferred whole when they have changed.
To improve that I created this little plugin I use to upload and download my DMG files (Mac disk images). What it does is splitting the local file into chunks (user-defined size) and uploads them to ACD as separate files. The download function then joins them back together.
Advantage is that only changed chunks of the file are uploaded/downloaded. This can speed up backup of partitions and disk images dramatically,
The plugins adds two new commands, split-upload and split-download.
The command
acd_cli split-upload <local-file> <remote-file> <chunk-size>
(example)
acd_cli split-upload ~/Downloads/Plain.dmg /plain.dmg 524288
will upload the local file Plain.dmg to /plain.dmg on ACD. A new folder "plain.dmg" will be created in the root of ACD and in that will be the chunk files of 512kb (524288) each.
With
acd_cli split-download <remote-file> <local-file> <chunk-size>
(example)
acd_cli split-download /plain.dmg ~/Downloads/Plain2.dmg 524288
the data is downloaded again into a different local file Plain2.dmg.
Only changes will be transferred on download and upload. So if an earlier version of the file already exists before calling "split-download" on it, chunks with matching MD5 hashes will not be downloaded.
Additionally the split-upload method has the option to compress each chunk and encrypt it.
The parameter "-lc / --lzma-compress" compresses each chunk using the lzma module. This should not be used on encrypted files like VeraCrypt containers.
To encrypt the chunks use the "-p / --password" option. This will encrypt each chunk with the specified password and random salt using AES-256 from PyCrypto. When using "split-download" the password needs to specified as well.
The chunks are saved in a OpenSSL standard format so that can be decrypted using openssl.
Example to upload a HD encrypted and compressed:
acd_cli split-upload -lc -p mysecretpassword /dev/rdisk2 /backups/macHD.img 8388608