"five million" files, and 1TB in total? Your files must be very small, then. I'd simply try rsync
:
rsync -alPEmivvz /source/dir remote.host.tld:/base/dir
If you don't have that - or your use-case doesn't allow for using rsync
, I'd at least check if 7z
works with your data. It might not, but I think it's still worth a try:
7z a archive.7z /source/dir
Or if you don't feel comfortable with 7z
at least try making a .tar.xz
archive:
tar cJv archive.tar.xz /source/dir
(it should be noted, that older versions of tar
don't create .tar.xz
archives, but .tar.lzma
archives, when using the J
switch. Even yet older versions of tar
, don't support the J
flag altogether.)
Since you're using a GUI program to create those files, I'm assuming you're feeling a bit uncomfortable using a command line interface.
To facilitate creation, management and extraction of archives from the command line interface, there's the small utility called atool
. It is available for practically every common distro I've seen, and works pretty much every single archive I've stumbled upon, unless the hopelessly obscure ones.
Check whether your distro has atool
in their repos, or ask your admin to install it, when it's in a workplace environment.
atool
installs a bunch of symlinks to itself, so packing and unpacking becomes a breeze:
apack archive.tar.xz <files and/or directories>
Creates an archive.
aunpack archive.7z
Expands the archive.
als archive.rar
Lists file contents.
What kind of archive is created, atool
discerns that by the filename extension of your archive in the command line.
.tar.gz
or COPYING the resulting compressed file? Either way, something is weird, because neither operation should consume more memory just because the files are big. That is, both operations should be streaming. Please include more information about exactly what commands are failing.tar
should just archive files incrementally as it lists them, never building up a list in memory. But again, please show the exact command you are using. Also, are all the files in the same directory or is the directory structure very deep?