Hi Christoph,
db_alter() has not changed. It alters the name of the database but the corresponding backups stay unchanged. I combine it with db:drop-backup()
That’s true: db:alter() will only rename databases. This has been a deliberate design choice (in analogy with db:drop, a user might want to treat backups differently than the currently active instance); but I think we should add an additional db:alter-backup function. I have just created an issue for that [1]; Thanks for the observation.
I copied the old data, restxq etc. into the new structure. … In both cases I lost my users. How can I upgrade without loosing them?
Users are stored in the data directory in the users.xml file. Did you copy this file as well?
Maybe the BaseX server was still running while you were copying the files? For databases, this shouldn’t matter (database are dynamically accessed), but the users.xml file will only be parsed at startup time.
Best, Christian
[1] https://github.com/BaseXdb/basex/issues/1742
On Mon, Oct 21, 2019 at 1:47 PM Christoph Gaukel christoph.gaukel@gmx.de wrote:
Hi Christian,
thank you for your answer. I upgraded from 9.1.2 to 9.2.4 and indeed:
the output of db:backups('test_balance_tmp') changed from: <backup database="test_balance_tmp" date="2019-10-18T00:05:50" size="2230">test_balance_tmp-2019-10-18-00-05-50</backup> to: <backup database="test_balance_tmp" date="2019-10-17T22:05:50Z" size="2230">test_balance_tmp-2019-10-18-00-05-50</backup>
The same with db:drop(), now it deletes the database but not the backups.
db_alter() has not changed. It alters the name of the database but the corresponding backups stay unchanged. I combine it with db:drop-backup()
From doing the upgrade, I got a new question. I have done two trials:
I copied the old data, restxq etc. into the new structure. I copied BaseX.jar and basex/lib into the old structure
In both cases I lost my users. How can I upgrade without loosing them?
Thanks,
Christoph
Am 18.10.19 um 10:25 schrieb Christian Grün:
Hi Christoph,
Welcome back to the list.
db:drop deletes both, the database and the corresponding backups
The function should only delete database and preserve backups. For deleting backups, db:drop-backup can be used. Maybe there was a bug in an older version of BaseX?
db:info($db)/resourceproperties/inputdate is a UTC dateTime with a time zone offset db:backups($db)/@date is a local dateTime without a time zone offset
Same here: Both returned timezones should be a UTC dateTime with the Z time offset.
Maybe you need to switch to the latest version of BaseX? Feel free to give us an update if the problems persist with BaseX 9.x.
Hope this helps, Christian