Trying to reproduce/understand --append-only
#8062
-
Hey, In the command="borg serve --append-only --restrict-to-path /opt/borg",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0H3T9YtJEzGnK+y6ol18ss6Bzjyh2a+wFYDwvrJ0ou append
command="borg serve --restrict-to-path /opt/borg",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGd456vtmLqQ2doHV3feKnZ4TKRA0Zj1hmSDrpRaGAWk full
unset SSH_AUTH_SOCK
export BORG_RSH="ssh -i borg-test-full"
export BORG_REPO="root@backup01:/opt/borg"
export BORG_PASSPHRASE="test"
borg init --encryption repokey --append-only
root@backup01:/opt$ cat /opt/borg/config | grep append
append_only = 1
unset SSH_AUTH_SOCK
export BORG_RSH="ssh -i borg-test-append"
export BORG_REPO="root@backup01:/opt/borg"
export BORG_PASSPHRASE="test"
function create() {
borg --verbose create "::$(date +%T)" ~/Downloads/CTS1_quickstartguide_EN.pdf
}
create
create
borg list Results in: Creating archive at "root@backup01:/opt/borg::11:09:20"
+ create
++ date +%T
+ borg --verbose create ::11:09:25 /home/kmille/Downloads/CTS1_quickstartguide_EN.pdf
Creating archive at "root@backup01:/opt/borg::11:09:25"
+ borg list
11:09:20 Sun, 2024-01-28 11:09:24 [f72f8fd0f4d5a4a32b53b4cce0643e2faf58a998d8cbe9857b0ac1de7f3ad144]
11:09:25 Sun, 2024-01-28 11:09:28 [4e0e44b3f95627573e3d68e764470dc1c77c5ed59ceaa61e3d924f533a3eb379]
+ borg list
11:09:20 Sun, 2024-01-28 11:09:24 [f72f8fd0f4d5a4a32b53b4cce0643e2faf58a998d8cbe9857b0ac1de7f3ad144]
11:09:25 Sun, 2024-01-28 11:09:28 [4e0e44b3f95627573e3d68e764470dc1c77c5ed59ceaa61e3d924f533a3eb379]
+ borg prune --keep-last 1
+ borg list
11:09:25 Sun, 2024-01-28 11:09:28 [4e0e44b3f95627573e3d68e764470dc1c77c5ed59ceaa61e3d924f533a3eb379]
+ borg check --verbose --progress --verify-data
Remote: Starting repository check
Remote: finished segment check at segment 13
Remote: Starting repository index check
Remote: Index object count match.
Remote: Finished full repository check, no problems found.
Starting archive consistency check...
Starting cryptographic data integrity verification...
Finished cryptographic data integrity verification, verified 4 chunks with 0 integrity errors.
Analyzing archive 11:09:25 (1/1)
Archive consistency check complete, no problems found. Hm. Any ideas what's wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 3 replies
-
Looks mostly ok, but there is one maybe confusing issue: You set append-only using 2 mechanisms:
|
Beta Was this translation helpful? Give feedback.
-
Hmm. As far as I understood, I need to globally enable append-only for the repo and then I can specify it per key. I just tried it again (but with + borg list
13:59:49 Sun, 2024-01-28 13:59:53 [54123f7b1814cc5d33688966f11b87f4945416ee84e147ddcd11290e1bc4855d]
+ borg --verbose --progress check --verify-data
Remote: Starting repository check
Remote: finished segment check at segment 13
Remote: Starting repository index check
Remote: Index object count match.
Remote: Finished full repository check, no problems found.
Starting archive consistency check...
Starting cryptographic data integrity verification...
Finished cryptographic data integrity verification, verified 5 chunks with 0 integrity errors.
Analyzing archive 13:59:49 (1/1)
Archive consistency check complete, no problems found. with full access ssh/borg. (one backup left, no message about a prune in append-mode) Same if I run it on the host itself: |
Beta Was this translation helpful? Give feedback.
-
From the docs: https://borgbackup.readthedocs.io/en/stable/usage/notes.html#append-only-mode-forbid-compaction
("server settings" refers to |
Beta Was this translation helpful? Give feedback.
-
I don't think so. What you need to do is to remove |
Beta Was this translation helpful? Give feedback.
-
OK, so what's the problem? |
Beta Was this translation helpful? Give feedback.
-
It doesn't work like you think it does. On a logical level, all works as usual. You can delete and prune archives. It just does not compact the segments (if you run |
Beta Was this translation helpful? Give feedback.
-
From borg's perspective, nothing strange happened. A1: I meant A2: No. |
Beta Was this translation helpful? Give feedback.
From borg's perspective, nothing strange happened.
A1: I meant
borg delete REPO
(without giving::ARCHIVE
). Now you are aware. :-)A2: No.