Skip to content

Commit 707f16b

Browse files
Scrumplexbdavis2-PCTY
authored andcommitted
fix(server): database backups compatible with deduplication (immich-app#13965)
gzip --rsyncable has a slightly worse compression ratio, but allows for efficient deduplication and, as the name implies, faster rsync operations. Signed-off-by: Sefa Eyeoglu <[email protected]>
1 parent 505f733 commit 707f16b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/services/backup.service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ export class BackupService extends BaseService {
9797
env: { PATH: process.env.PATH, PGPASSWORD: isUrlConnection ? undefined : config.password },
9898
});
9999

100-
const gzip = this.processRepository.spawn(`gzip`, []);
100+
// NOTE: `--rsyncable` is only supported in GNU gzip
101+
const gzip = this.processRepository.spawn(`gzip`, ['--rsyncable']);
101102
pgdump.stdout.pipe(gzip.stdin);
102103

103104
const fileStream = this.storageRepository.createWriteStream(backupFilePath);

0 commit comments

Comments
 (0)