Gentoo Archives: gentoo-user

From: Laurence Perkins <lperkins@×××××××.net>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: RE: [gentoo-user] How to compress lots of tarballs
Date: Tue, 28 Sep 2021 17:45:18
Message-Id: MW2PR07MB405802C30135054ED4374FC6D2A89@MW2PR07MB4058.namprd07.prod.outlook.com
In Reply to: Re: [gentoo-user] How to compress lots of tarballs by Ramon Fischer
1 Regular xzutils now does multiple threads with the -T option.
2
3 > -----Original Message-----
4 > From: Ramon Fischer <Ramon_Fischer@×××××××.de>
5 > Sent: Sunday, September 26, 2021 5:23 AM
6 > To: gentoo-user@l.g.o
7 > Subject: Re: [gentoo-user] How to compress lots of tarballs
8 >
9 > In addition to this, you may want to use the parallel implementations of "gzip", "xz", "bzip2" or the new "zstd" (zstandard), which are "pigz"[1], "pixz"[2], "pbzip2"[3], or "zstmt" (within package "app-arch/zstd")[4] in order to increase performance:
10 >
11 > $ cd <path_to_mounted_backup_partition>
12 > $ for tar_archive in *.tar; do pixz "${tar_archive}"; done
13 >
14 > -Ramon
15 >
16 > [1]
17 > * https://www.zlib.net/pigz/
18 >
19 > [2]
20 > * https://github.com/vasi/pixz
21 >
22 > [3]
23 > * https://launchpad.net/pbzip2
24 > * http://compression.ca/pbzip2/
25 >
26 > [4]
27 > * https://facebook.github.io/zstd/
28 >
29 >
30 > On 26/09/2021 13:36, Simon Thelen wrote:
31 > > [2021-09-26 11:57] Peter Humphrey <peter@××××××××××××.uk>
32 > >> part text/plain 382
33 > >> Hello list,
34 > > Hi,
35 > >
36 > >> I have an external USB-3 drive with various system backups. There are
37 > >> 350 .tar files (not .tar.gz etc.), amounting to 2.5TB. I was sure I
38 > >> wouldn't need to compress them, so I didn't, but now I think I'm
39 > >> going to have to. Is there a reasonably efficient way to do this? I
40 > >> have 500GB spare space on /dev/sda, and the machine runs constantly.
41 > > Pick your favorite of gzip, bzip2, xz or lzip (I recommend lzip) and
42 > > then:
43 > > mount USB-3 /mnt; cd /mnt; lzip *
44 > >
45 > > The archiver you chose will compress the file and add the appropriate
46 > > extension all on its own and tar will use that (and the file magic) to
47 > > find the appropriate decompresser when you want to extract files later
48 > > (you can use `tar tf' to test if you want).
49 > >
50 > > --
51 > > Simon Thelen
52 > >
53 >
54 > --
55 > GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF
56 >