From c757c40ce74cdc0b959e9e027a82e2ed7dbd7c83 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 18 Feb 2021 13:30:21 -0600 Subject: [PATCH] Force relative paths in tar --- bin/backupify | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/backupify b/bin/backupify index 6ec5004..2934892 100755 --- a/bin/backupify +++ b/bin/backupify @@ -13,9 +13,11 @@ if not test -d $argv[1] exit 1 end set fn (date +%Y%m%d_%H%M%S)(basename $argv[1]) -tar -cvf - $argv[1] 2>/dev/null | +pushd (dirname $argv[1]) +tar cvf - (basename $argv[1]) 2>/dev/null | zstd --ultra -T2 -22 | gpg --encrypt --recipient daniel@lyte.dev | ssh $host "cat - > $dir/$fn$ext" +popd # TODO: checksum? echo "Uploaded to host rift via ssh at $dir/$fn$ext"