<!--
SPDX-FileCopyrightText: 2026 BaseLabs Holdings LLC

SPDX-License-Identifier: MIT
-->

# Back up and restore a database

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.

```elixir
{: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](../topics/client/compatibility.md) for the local
restore setting. The setting does not affect local file import.
