# Reduce la necesidad de espacio en disco local al no comprimir (de manera redundante) las copias de seguridad con gzip

**URL:** <https://meta.discourse.org/t/reduce-local-disk-space-needs-by-not-redundantly-gzipping-backups/245763>\
**Category:** Feature\
**Tags:** backups\
**Created:** [16 Noviembre, 2022 12:38 UTC](https://meta.discourse.org/t/reduce-local-disk-space-needs-by-not-redundantly-gzipping-backups/245763 "2022-11-16T12:38:03Z")\
**Posts on this page:** 1\
**Showing post:** 32

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [21 Octubre, 2026 13:47 UTC](https://meta.discourse.org/t/reduce-local-disk-space-needs-by-not-redundantly-gzipping-backups/245763/32 "2026-10-21T13:47:32Z")

</div>

Este cambio debería eliminar el requisito de ‘2x espacio en disco’ para las copias de seguridad. También distribuye el coste de CPU de `gz` durante toda la operación de copia de seguridad, en lugar de que sea un cuello de botella al final:

> <https://github.com/discourse/discourse/pull/44908>
>
> Previously, backups would require 2x the disk space of the final backup. This ha…ppened at two different stages:
> 
> 1. For sites with S3 uploads, they would all be downloaded to a staging directory. Then they would be added to the \`.tar\` file. While adding to the \`.tar\` file, two copies of the uploads would be present on disk
> 
> 2. For all sites, the \`.tar\` file would be assembled, then it would be compressed. During compression, two copies of the backup would be present on disk
> 
> This commit introduces a streaming system for creating the \`.tar.gz\` files. When adding files to a backup (either from the database, S3, or local uploads), they are now piped straight into \`tar\`, then \`gz\`, then the disk.
> 
> This removes the '2x disk space' requirement, and also spreads the disk i/o and CPU requirements throughout the whole backup duration, rather than bunching compression and \`tar\`-ing at the end.

También estamos investigando la idea de eliminar por completo la compresión del contenedor `.gz`. Pero eso supondría un cambio en el formato, por lo que debemos ser especialmente cautelosos con ese tipo de cambios.

Las personas que usan S3 para subir archivos también pueden estar interesadas en [esta mejora de rendimiento](https://github.com/discourse/discourse/commit/2a11f11d6bc6d689db5ac6f0e17d0f7877164c80) que se implementó ayer.

---

_[View the full topic](https://meta.discourse.org/t/reduce-local-disk-space-needs-by-not-redundantly-gzipping-backups/245763)._
