From 8767af34a63964717def66809408243987b541e4 Mon Sep 17 00:00:00 2001 From: "Guillaume \"B.B.\" Van Hemmen" Date: Wed, 21 Aug 2024 12:53:04 +0200 Subject: [PATCH] #000 - Remove redundant tar option in backup command The `-z` option in the tar command was removed since it is unnecessary for the current backup operation. This simplifies the command and avoids potential confusion regarding compression. --- src/commands/docker-volume-manager.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/commands/docker-volume-manager.ts b/src/commands/docker-volume-manager.ts index 1e2a55a..fbc9fdf 100644 --- a/src/commands/docker-volume-manager.ts +++ b/src/commands/docker-volume-manager.ts @@ -105,9 +105,7 @@ const runVolumeBackup = async (toolbox: Toolbox, workingDir: string, volumes: st try { spinner.start(`backing up volume ${volume}...`) - // improvement: display progress - // see: https://superuser.com/questions/168749/is-there-a-way-to-see-any-tar-progress-per-file - await system.run(`docker run --rm -v ${volume}:/volume -v ${workingDir}:/tmp alpine sh -c "cd /volume && tar -z -c -p -f /tmp/${volume}.tar ."`); + await system.run(`docker run --rm -v ${volume}:/volume -v ${workingDir}:/tmp alpine sh -c "cd /volume && tar -c -p -f /tmp/${volume}.tar ."`); spinner.succeed(`volume ${volume} backed up!`) } catch (error) { @@ -147,8 +145,6 @@ const command: GluegunCommand = { print.success('Your volume have been backed up!') } else if (choice === 'Restore volumes') { // select the backup location folder - // @ts-ignore - const workingFolder = await getAndValidateBackupFolder(toolbox); // list and select the archives to restore