惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
有赞技术团队
有赞技术团队
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园_首页
Y
Y Combinator Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
雷峰网
雷峰网
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
P
Proofpoint News Feed
B
Blog
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Discourse Meta - Latest posts

Horizon: High Context Topic Cards I'd like to ask what this file /var/www/discourse/vendor/data/RT_sRGB.icm is used for? Discourse to Markdown Plugin How to verify a subdomain (mysite.discourse.group) in Google Search Console? Reader Mode Publishing WordPress gallery posts on Discourse Discourse User Feedback New user filter by custom field and contact Interact with discourse from Python? Why we can't type the assignee in the search of a post to assign - home screen app Redis Flushall Category-toggled one-touch move post Some sort of variable to eliminate duplicate text? Why did this plugin replacement fail? Add user to list modal often appears above the mobile viewport sceen Creating/Editing a post on mobile: let's discuss the 2026 Discourse experience Wp-discourse feature request - do not show comments with specific tag? Are there any good Chinese plugins? Discourse ID and 2FA Discourse MCP is here! Sample Forum to See Admin Features? I am unable to register for a free Discourse site Wikipedia Lookup Add text for /login (like js.create_account.disclaimer for /signup) How can i set disable Markdown & Default to Rich Text What's the background image size for the Welcome Banner? How do I enable Associated Accounts with 2FA? Hamburger toggle Support <span data-attribute> in the rich editor Cannot disable read-only mode on Free Plan
Reduce local disk space needs by not (redundantly) gzippi...
@Ed_S Ed S · 2026-04-24 · via Discourse Meta - Latest posts

1

The backup process creates a tar file and then applies gzip to it. There are two types of things in the tar file: an already gzipped sql dump and the contents of uploads (if requested.) In my case every upload file is already compressed: gz, gzip, gif, jpeg, png, zip. So the final gzipping gains only 1% of size.

I believe it would be better to demand less free space.

A previous topic from 2016 mentions disabling backup compression, but it looks like the sql dump was at that time not compressed, which shifted the tradeoffs.

Add option to disable backup compression

11 Likes

2

I’m already working on a new backup format that removes the double compression. My hope is that it will be ready within a month or two.

13 Likes

3

2 Likes

4

Any update on this? Thanks

1 Like

5

Not to bug you too much, but how is this progressing?

6

Development of that feature is currently paused and it isn’t on our current roadmap. I hope we will get to it in 2024.

4 Likes

7

If I wrote a patch to accept a 0 in the compression rate to disable gzip, would that be something that you would accept?

1 Like

8

(I’m guessing that you’d save CPU time that way, but not space, because the gzipped tar file would still be created.)

9

I’m aiming to save cpu time. Actually, I was thinking of using the 0 as a flag that would change the code path so that it doesn’t gzip (sadly, zero is not a valid compression level supported across all gzip versions, afaik).

10

Hmm that wouldn’t help me at all! (Likewise others who’ve had the same problem with limited disk space.)

If tar were being used, it could be used with z or j options. If a subshell were being used, the output of tar could be piped into gzip. But I think in fact some higher level ruby functions may be in use.

1 Like

11

cough

2 Likes

12

Maybe it shouldn’t be too difficult… I appreciate that making changes to backup and restore must be made with great care, but I think just inlining the compression would save a lot of space requirement without any compatibility question.

From tar --help

-a, --auto-compress use archive suffix to determine the compression
-z, --gzip, --gunzip, --ungzip filter the archive through gzip

1 Like

13

Does -z actually do an in-place compression? I always assumed that it just ran gzip after the tar file is completed.

14

Unwisely, in this case! The bytes which represent the uncompressed tar file never hit the disk.

2 Likes

15

Are you saying we can simply add
"--gzip",

And it will stop requiring fully double the actually space used used the data?

1 Like

16

Yes, that’s the change to the tar command.

1 Like

17

Looks like an even better choice is --zstd but then we’d also need ‘zstd’ package installed in the docker image.

2 Likes

18

Possibly a better approach which might simplify things - being able to deal with existing backups which might be *.gz or *.zst - is to use tar’s automatic detection:

tar --auto-compress -c -f ../file.tar.gz .
tar --auto-compress -c -f ../file.tar.zst .

More important for the unpacking, of course, where we might not know what we’re going to see.

Presently the ruby code seems to do lots of things which tar itself can do. Hopefully this can be simplified, rather than becoming more complex.

2 Likes

19

zstd is also a great deal quicker - which makes it less problematic that we spend time compressing the near-incompressible.

(If zstd were also used for the sql dump, in my case that comes out 10% smaller.)

1 Like