-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
ArcadeDB Version:
ArcadeDB Server v23.11.1-SNAPSHOT (build b1166c17e7d23b05fc146b924e7526167c1269af/1699373542011/main)
OS and JDK Version:
Running on Mac OS X 12.7 - OpenJDK 64-Bit Server VM 17.0.9 (Homebrew)
The backup/import/restore etc process does not work for certain cases.
Expected behavior
BACKUP DATABASE + IMPORT DATABASE or BACKUP DATABASE + server.defaultDatabase or BACKUP DATABASE and bin/restore.sh restore the state of the backup.
Actual behavior
Any of the above works as expected
Steps to reproduce
SQL Script (Studio)
CREATE DOCUMENT TYPE doc;
BACKUP DATABASE;
(Reset Database)
IMPORT DATABASE file://backups/test/backup-test-XXXXXXXX-YYYYYYYYY.zip;
SELECT FROM schema:types;
There is only a document type Document listed, I did not create.
Also an error is logged:
SEVER [BackupDatabaseStatement] <ArcadeDB_0> Found pending transaction. Rolling it back before the backup...Executing full backup of database
This error seems to happen even when I wrap the CREATE DOCUMENT TYPE in a BEGIN ... COMMIT or make two separate SQL scripts of creating and backing up, and also when adding a 30s sleep in between.
defaultDatabases
CREATE DOCUMENT TYPE doc;
BACKUP DATABASE;
(Reset Database)
bin/server.sh "-Darcadedb.server.rootPassword=arcadedb" "-Darcadedb.server.defaultDatabases=test{import:backups/test/test-backup-XXXXXXXX-YYYYYYYYY.zip}"
SELECT FROM schema:types;
restore.sh
CREATE DOCUMENT TYPE doc;
BACKUP DATABASE;
(Reset Database)
bin/restore.sh -f backups/test/test-backup-XXXXXXXX-YYYYYYYYY.zip -d databases/test
yields an error:
Exception in thread "main" com.arcadedb.integration.restore.RestoreException: Error during restore of database from file 'backups/test/test-backup-XXXXXXXX-YYYYYYYYY.zip'
at com.arcadedb.integration.restore.Restore.restoreDatabase(Restore.java:58)
at com.arcadedb.integration.restore.Restore.main(Restore.java:45)
Caused by: com.arcadedb.integration.restore.RestoreException: The backup file 'backups/test/test-backup-XXXXXXXX-YYYYYYYYY.zip' not exist
at com.arcadedb.integration.restore.format.FullRestoreFormat.openInputFile(FullRestoreFormat.java:135)
at com.arcadedb.integration.restore.format.FullRestoreFormat.restoreDatabase(FullRestoreFormat.java:53)
at com.arcadedb.integration.restore.Restore.restoreDatabase(Restore.java:55)
I also tried absolute path but this leads leads to an error that the path cannot begin with /.
With a more complex schema this error seems to happen only for types without records. However, even in the case the type information is stored other parts of the type definition, like custom attributes, are not stored. I will add further issues once I can produce simple examples for those too.