Closed calestyo closed 1 year ago
I should add, that other btrbk
actions like clean don't seem to realise either, that these (incremental) backups are unusable.
The same also happens with 0.32.5-1
but I've also noticed (at least with that version) the following:
resume
leads to a full dump first followed by incremental ones (all with a usable parent).On backup2.example.org
:
-rw-r--r-- 1 root root 6,5G Nov 15 19:03 data.20221113T000031+0100.btrfs.gpg
-rw-r--r-- 1 root root 220 Nov 15 19:03 data.20221113T000031+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 435M Nov 15 19:03 data.20221114T000050+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 19:03 data.20221114T000050+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 415M Nov 15 19:04 data.20221115T000053+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 19:04 data.20221115T000053+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 109M Nov 15 19:04 data.20221115T063929+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 19:04 data.20221115T063929+0100.btrfs.gpg.info
with:
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668534970
TYPE=raw
FILE=data.20221113T000031+0100.btrfs.gpg
RECEIVED_UUID=de6455ef-da07-c74a-ae9f-ff7c536b848b
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668535382
INCOMPLETE=0
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668535382
TYPE=raw
FILE=data.20221114T000050+0100.btrfs.gpg
RECEIVED_UUID=912acaa5-9c1f-bf46-8779-268271c22323
RECEIVED_PARENT_UUID=de6455ef-da07-c74a-ae9f-ff7c536b848b
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668535410
INCOMPLETE=0
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668535411
TYPE=raw
FILE=data.20221115T000053+0100.btrfs.gpg
RECEIVED_UUID=98b58b8e-793d-4f4e-ad44-c53cd9979fcb
RECEIVED_PARENT_UUID=912acaa5-9c1f-bf46-8779-268271c22323
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668535444
INCOMPLETE=0
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668535444
TYPE=raw
FILE=data.20221115T063929+0100.btrfs.gpg
RECEIVED_UUID=a472b0bc-bffd-ed4e-8fa7-e3d832374335
RECEIVED_PARENT_UUID=98b58b8e-793d-4f4e-ad44-c53cd9979fcb
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668535451
INCOMPLETE=0
I re-did backup1.example.org
... first I removed all but the full one (with 6,8 GB) then resume
:
-rw-r--r-- 1 root root 178M Nov 15 18:55 data.20221113T000031+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 18:55 data.20221113T000031+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 435M Nov 15 18:55 data.20221114T000050+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 18:55 data.20221114T000050+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 6,8G Nov 15 04:18 data.20221115T000053+0100.btrfs.gpg
-rw-r--r-- 1 root root 159 Nov 15 04:18 data.20221115T000053+0100.btrfs.gpg.info
-rw-r--r-- 1 root root 109M Nov 15 18:56 data.20221115T063929+0100.btrfs.gpg
-rw-r--r-- 1 root root 278 Nov 15 18:56 data.20221115T063929+0100.btrfs.gpg.info
with:
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668534936
TYPE=raw
FILE=data.20221113T000031+0100.btrfs.gpg
RECEIVED_UUID=de6455ef-da07-c74a-ae9f-ff7c536b848b
RECEIVED_PARENT_UUID=98b58b8e-793d-4f4e-ad44-c53cd9979fcb
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668534946
INCOMPLETE=0
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668534947
TYPE=raw
FILE=data.20221114T000050+0100.btrfs.gpg
RECEIVED_UUID=912acaa5-9c1f-bf46-8779-268271c22323
RECEIVED_PARENT_UUID=de6455ef-da07-c74a-ae9f-ff7c536b848b
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668534958
INCOMPLETE=0
-e -n #btrbk-v0.27.1
# Do not edit this file
TYPE=raw
FILE=data.20221115T000053+0100.btrfs.gpg
RECEIVED_UUID=98b58b8e-793d-4f4e-ad44-c53cd9979fcb
encrypt=gpg
-e -n #btrbk-v0.32.5
# Do not edit this file
#t=1668534959
TYPE=raw
FILE=data.20221115T063929+0100.btrfs.gpg
RECEIVED_UUID=a472b0bc-bffd-ed4e-8fa7-e3d832374335
RECEIVED_PARENT_UUID=98b58b8e-793d-4f4e-ad44-c53cd9979fcb
encrypt=gpg
INCOMPLETE=1
-e -n #t=1668534970
INCOMPLETE=0
That looks better now... though a bit mixed up... the first two now depend from the 3rd (the full one)... the 4th, also from the 3rd.
No idea, why that didn't work above, maybe there was actually something fixed after 0.27.1
?
No idea, why that didn't work above, maybe there was actually something fixed after 0.27.1?
In v0.32.0, incremental_prefs
was implemented, which optimizes the selection of parents / clones, see btrbk.conf.5. I believe it should work fine with incremental raw targets, but this is not well tested (I don't use this feature any more, have migrated all backup targets to btrfs by now).
Sorry I don't have much time to dig deeper into this right now, as part of this code is also getting refactored in the action-cp branch which will make things even more transparent: the idea being that you could do something like btrbk cp --raw /source/* /raw-disk/
.
I'm a bit puzzeled of your info files, this is wrong:
-e -n #btrbk-v0.32.5
The -e -n
comes from the echo command. Do you have echo
which does not support these options? Will have to look up what posix says about this, but I thought all coreutils (busybox included) supports it.
In v0.32.0, incremental_prefs was implemented, which optimizes the selection of parents / clones, see btrbk.conf.5. I believe it should work fine with incremental raw targets
Ah,.. maybe that fixed it... (at least with this unusual "backward incremental send".
Do you think any of this could also fix my rotation issue with incremental dumps?
but this is not well tested (I don't use this feature any more, have migrated all backup targets to btrfs by now).
Well my main problem with that is security,... I'd like the backup host to be not able to read the backups.
Sorry I don't have much time to dig deeper into this right now, as part of this code is also getting refactored in the action-cp branch which will make things even more transparent: the idea being that you could do something like btrbk cp --raw /source/* /raw-disk/.
Okay... curious.
The -e -n comes from the echo command. Do you have echo which does not support these options? Will have to look up what posix says about this, but I thought all coreutils (busybox included) supports it.
POSIX says it's not portable, and actually "recommends" more or less against using echo
but rather printf
.
See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
E.g. dash
doesn't support it:
$ dash
$ echo -n -e foo
-e foo$
Well my main problem with that is security,... I'd like the backup host to be not able to read the backups.
@calestyo can we close this issue? I think the parent thing is correct in 0.32.5 (and no, I'm not going to debug old btrbk versions)
It looked like it must have been fixed sometime after 0.27.1
, so yes... I guess we can close.
Thanks.
Hey.
This was with some older version (
0.27.1
from Debian stable).I first tested the raw dumps with full ones every 4 hours and incremental ones all the other hours, as described here https://github.com/digint/btrbk/issues/474#issuecomment-1312747334).
Until this works, I switched back now to non-incremental backups with this config:
So
incremental
was stillyes
per default, but in the systemd service I had overridden it to no.Now first, I had a number of full dumps left, when I still did these all 4 hours:
(no other dumps in the dir)
Then, with the above
btrbk.conf
I ran:which of course lacked the override for
incremental
, with this output:Okay, so some of the full dumps got deleted, which is fine, as my retention policy is now
2d 1w 1m
an before it was far smaller.The end-result was this:
With these sidecars:
As one can see, only the 3rd one (which is a full one, that exists still from the old config) is actually usable.
target_preserve_min latest
, has no parent either.Shouln't
btrbk
catch this and ... at least error out or just transfer a full send then or so? Or do I make some wrong assumptions?Thanks, Chris.