Question
How can I rsync
uncompressed (but highly compressible) data to a single compressed archive (.tar.gz
, .zip
, etc) without transferring all the data each time?
Current
This is what I am using now:
rsync -a --delete-during "/home/" "/mnt/external-hdd/backups/"
On the local side (/home/
), there will be thousands of small text files that are compressible.
On the "remote" side (/mnt/external-hdd/backups/
), there will be an exact copy of the local side.
Wanted
- local side: same as before
- "remote" side: a
homes.tar.gz
that contains all of the data from/home
, that can be incrementally updated like howrsync
works by default
I will not be independently accessing specific files from homes.tar.gz
. If an issue occurs, I will restore it to whatever homes.tar.gz
contains.
This will significantly reduce storage size since data is compressed.
Prefarably, it should not require tar czf homes.tar.gz backups/; mv homes.tar.gz /mnt/external-hdd/backups/homes.tar.gz
. That is, tar
ring and transferring all the data each time.
rsync
is just an example tool. I have mentioned it so it is clear what I want (behavior likersync
that can incrementally update the remote, but where the remote stores it as an archive (.tar.gz
or other compressed format)).gzip
's--rsyncable
flag and thoughtrsync
itself might be able to handle my use case.