Back up and restore a database

Copy Markdown View Source

Use Arcadic.Backup on an HTTP connection to create a server-side backup and restore it under a different database name. Prepare a server-reachable backup location and credentials with the required ArcadeDB privileges.

{:ok, _} = Arcadic.Backup.backup(conn, to: "file:///backups/mydb.zip")
{:ok, backups} = Arcadic.Backup.list(conn)
{:ok, _} = Arcadic.Backup.restore(conn, "mydb_restored", "file:///backups/mydb.zip")

Omit :to to use the server's default backup directory. Arcadic validates the URL's syntax. Treat backup and restore URLs as trusted operator input. The server controls whether it accepts private addresses and local files. Check Compatibility for the local restore setting. The setting does not affect local file import.