diff options
author | Tharre <tharre3@gmail.com> | 2019-02-09 16:28:37 +0100 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2019-02-09 16:52:39 +0100 |
commit | 63b0cd2c634e5099e05a6d9843f2cc3c3b6513b7 (patch) | |
tree | 7c821b53215cf02047f021597d736bdab713219a | |
parent | 7f111d225ac0c6aa9d2ad912a7e0f27375a899dc (diff) | |
download | pkgbuilds-63b0cd2c634e5099e05a6d9843f2cc3c3b6513b7.tar.gz pkgbuilds-63b0cd2c634e5099e05a6d9843f2cc3c3b6513b7.tar.xz pkgbuilds-63b0cd2c634e5099e05a6d9843f2cc3c3b6513b7.zip |
arch-system: borgbackup: use snapshot timestamps
Previously, a archive would get the timestamp of the time it was
uploaded, instead of the time when the snapshot was created.
This is problematic, since archives are pruned by this timestamp,
meaning if multiple archives are uploaded together most of them would be
pruned immediately after.
-rw-r--r-- | arch-system/PKGBUILD | 4 | ||||
-rwxr-xr-x | arch-system/backup-sudo | 1 | ||||
-rwxr-xr-x | arch-system/borgbackup | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/arch-system/PKGBUILD b/arch-system/PKGBUILD index 5e318ac..1f47597 100644 --- a/arch-system/PKGBUILD +++ b/arch-system/PKGBUILD @@ -29,10 +29,10 @@ sha256sums=('bb00c42f2802c12536c46700b948d41a43153d97a6986827b7c61203880e1ad1' '7467bb40e7d404ed249b34a0e410b8d452ebc4b90588d7e210bfa47011b5981d' 'dd84877b7f6f4330da489fa33f843c9a7c862562a3d78dc2feea5116ac846a79' '483a7d9350653c2cf22f36f67f1a83cc5c95232dfc10642a20d76e3c32c9e2e3' - '99cd268de0e9b847d65f802e7bcbbf7318398a04db61523545d4002ebdfb4d9c' + 'ea50cd57140fc3a27c027de7c289f058c23c840cc9ce65593969e8e2dd5b8e65' '42050ba722df1cd606288e82054e131dac99bf10506f4c8d52eb9bfc0a078d89' 'e1bf3dc5978a7641f86975b7ee770a6914b30a8e4b7e3be2f1b07eaa7098591d' - 'e5eb8baf5e3f132a0a4e2257261872356075896e0a419fe2c03b608063279994' + 'e1e862b4be6aa666bd1ca2ddd01eb5e57e063d1a2d23b60666ae6006be9ad929' '5613c98d32e513a973e8a0e250ab0b267882a73615f507b6208d4a5f21487fe6') package_base-system() { diff --git a/arch-system/backup-sudo b/arch-system/backup-sudo index b2694b6..38594da 100755 --- a/arch-system/backup-sudo +++ b/arch-system/backup-sudo @@ -12,6 +12,7 @@ validate_path() { case "$1" in snapshot) validate_path "$2" + touch /home btrfs subvolume snapshot -r -- /home "$2" ;; delete_snapshot) diff --git a/arch-system/borgbackup b/arch-system/borgbackup index a022b3d..9368452 100755 --- a/arch-system/borgbackup +++ b/arch-system/borgbackup @@ -49,6 +49,7 @@ backup() { cd /backup borg create --stats $borg_progress \ --exclude-from ~/.borg_exclude \ + --timestamp . \ --show-rc \ ::"$(basename "$1")" . && rc=$? || rc=$? if [ $rc -eq 1 ]; then |