[Borgbackup] Recreate segments after changing max_segment_size

Sebastian Felis sebastian at silef.de
Fri Feb 5 16:55:15 EST 2021


Hi,

On 14.01.21 22:19, Sebastian Felis wrote:
> On 1/14/21 7:12 PM, Thomas Waldmann wrote:
>>> e.g. given sements 0, 1, 2, 3 will be concatenated to segement 0
>>>
>>> tail -c +9 data/0/1 >> data/0/0
>>> tail -c +9 data/0/2 >> data/0/0
>>> tail -c +9 data/0/3 >> data/0/0
>>> rm data/0/[123]
>>> rm hints.* index.* integrity.*
>>
>> A borg repo is not supposed to be used like that.
>>
>> Also, I don't think anyone wants to support dealing with a borg repo 
>> on that level - at least not me. :-)
>>
>>> Is there any risk doing this?
>>
>> The risk is that you accidentally damage your repo, lose data, cause 
>> inconsistencies. The other risk is that other people read this and try 
>> this (maybe less carefully / knowledgeable than you).
> 
> For sure, it is a low level operation with I-know-what-I-do attitude 
> covered by a backup of the backup.
> 
> And your answers don't say any no-s ;-)
> 
>>>> I have several borg repos with small segment sizes of 5 MB. I would 
>>>> like
>>>> to recreate the segments to a larger size for better repo backup with
>>>> rsync/rclone.
>>
>> Why should it be "better" with a larger size?
>>
>> The 500MiB default of borg 1.1.x is primarily optimized for local repos.
>>
>> Doing some sync-to-remote could rather improve by using a 
>> smaller-than-default segment size.
> I target 128MiB segment sizes for "better" remote backups. 128MiB is 
> more a gut decision than a technical evaluated optimum.

In the meanwhile I was able to concatenate successfully my 5 MB segments 
to 128MB and borg check ran fine. For reference I created a bash script 
which can be found here

https://gist.github.com/xemle/725b817b6fc485dfc231ff7c99868f0f

Again: Thank you for building such a great backup tool!

BR

Sebastian


More information about the Borgbackup mailing list