On 2021-12-28 14:18, Graham Dicker wrote:
On Tuesday, 28 December 2021 12:03:05 GMT Josip Deanovic wrote:
> Is dropping user bacula the action that emptied all the Bacula tables
> of data?
> I know very little about the behaviour of mysql. Anyway, the tables
> were still
> there but empty so I created a new volume and Bacula is now happily
> backing up
> to it. It will take some hours yet to finish that.

Ok, so everything is in order now?


Dropping user using "drop user" command in mysql client
wouldn't cause deletion or truncation of data from the
tables.

I just did "drop user bacula" and that only removed
row from mysql.user table that looked like:
Host      | User
----------+-------
%         | bacula

When I issued the command "drop user 'bacula'@'localhost',
the other row containing bacula user password was deleted
as well:
Host      | User
----------+-------
localhost | bacula

Tables and the data inside the tables were left intact
as it should be.

I was mistaken. The data from my backups going back for months is still all there and I can see it using mysql. Using bconsole Bacula can see the tables (or did it create new ones?) but not the data in them. That's why it told me
it needed a new volume.

If you performed import of the data at some point, this is what
created the tables (and probably populated them with the data unless
the backup didn't contain the data).
It all depends on exact actions you performed.

Remember that you have been using dedicated akonadi mysql instance
which kept the data in the /home/graham/.local/share/akonadi/db_data/
directory.

Now your mysql instance keeps the data in the /var/lib/mysql which
is the default for most Linux distributions and MySQL installations.

--
Josip Deanovic


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to