How to backup nicely a part of HDD's data dirs into a pendrive ?
I always used the following commands for creating protected archives:
tar cfz - foo/ | gpg -c -o output.tar.gz.gpg When in need I use this for extracting: gpg -d output.gpg | tar xfz - Now I'd like to merge the following multipart archiving procedure into the above: tar cvzf - /home/user/foo/ | split --bytes=2000MB - foo.tar.gz. How can it be done ? I'm not an expert in advanced bash, unfortunately ... |
To create the files, something like this works:
Code:
tar czf - foo/ | split --bytes=2MB --filter='gpg -c -o $FILE.gpg' - foo.tar.gz Code:
#!/bin/bash |
I tried creating archives, but it asks for a passphrase each time a partial file is to be processed, so it is not very usefull :-(
|
Yeah, it would make more sense to create the full size encrypted archive first and then split it. Does gpg have an option to output to stdout rather than an output file? If so, then maybe this will work (I'm just guessing right now)...
Code:
tar cfz - foo/ | gpg -c | split --bytes=2000MB - foo.tar.gz.gpg.part 1) tar foo 2) encrypt the output of tar foo 3) split the output of encrypt the output of tar foo and the second line will: 1) merge foo.tar.gz.gpg.part* 2) decrypt the merge of foo.tar.gz.gpg.part* 3) untar the decrypted merge of foo.tar.gz.gpg.part* I think? |
Quote:
|
For me works well too, more testing now in progress !
|
All times are GMT -5. The time now is 09:29 PM. |