[pkg-bacula-devel] Status/The database update
Sven Hartge
sven at svenhartge.de
Sun Feb 25 09:02:35 GMT 2024
On 22.02.24 14:45, Carsten Leonhardt via pkg-bacula-devel wrote:
> Sven Hartge <sven at svenhartge.de> writes:
>> I upgraded my main-work installation.
>>
>> The File table contains ~1 billion entries and the whole migration
>> took about 27 hours with a peak at 600GB, settling down to 350GB in
>> the end.
>>
>> I needed to move the database directory for MariaDB over to our Netapp
>> AFF400 (luckily my DB server has dual 10G NICs) to have enough space
>> for this, as the server itself only has 440GiB for /var/lib/mysql.
>
> Hm, when I did my last upgrade to v13 I actually forgot about the space
> requirements, but it went through anyway. I wonder if we should have
> some fat in-your-face warning before the actual upgrade starts, maybe
> with debconf. Like when you want to remove your currently running linux
> kernel.
We *do* have the warning via apt-listchanges. Not everyone sees it though.
My first thought was to have code to check the size of the DB and
compare that against the space in the dbdir, but since that can be
configured and be very different (or even remote, like in my case), this
will just fail.
So the next best thing would be a big warning the user needs to actively
answer "yes" to, to continue.
At least (with MariaDB) for the big File table upgrade and the
subsequent ALTER TABLEs, it will not corrupt the DB when you run out of
space, because everything is done to new or temp tables, leaving the
original alone, so recovery should be possible when it fails.
>> I had one error during the upgrade:
>>
>> mysql said: ERROR 1060 (42S21) at line 1: Duplicate column name
>> FileMediaId'
>>
>> That is from the 13.0.0 upgrade file, but the rest of the changes went
>> in without a problem, I manually checked. And this error was also
>> inconsequential because the added column was already exactly in the
>> format it would have been added.
>
> That's really strange, because I don't find any mention of FileMediaId
> before our 13.x release.
>
> git log -SFileMediaId
>
> I suppose the update didn't abort?
No, the update ran the other lines in the 13.0.0 upgrade file just fine,
I manually checked to make sure.
Grüße,
Sven.
More information about the pkg-bacula-devel
mailing list