# basemodo backup

Take a Backup of an App's data now: its database and every file on its volume.

```sh
basemodo backup [OPTIONS]
```

Basemodo already takes one a day; take one before something risky (a migration, a bulk edit), then `basemodo restore <backup>` if it goes wrong. Each Backup is kept 7 days. The App keeps running meanwhile.

## Arguments

- `--app <APP>`: The App to back up. Default: the one named after the current folder.

Like every command, it also takes the [global options](https://basemodo.com/docs/cli#global-options) `--json` and `--api-url`.

## Examples

Back up the App of this folder before a migration:

```sh
basemodo backup
basemodo run "npm run migrate"
```

Back up another App, keeping the id for a script:

```sh
basemodo backup --app lunch-rota --json
```

## Output

With `--json`, it prints {"id", "app", "kind" (manual), "size_bytes", "created_at", "expires_at"}.

## From an agent

Basemodo's [MCP](https://basemodo.com/docs/mcp) serves it as the tool [`backup`](https://basemodo.com/docs/mcp/tools/backup). It changes things, so an agent's client may ask you before it runs. Its arguments are the command's, named as JSON keys: `app` (text). It answers what the command prints with `--json`.

## Explained in

- [Data: the disk, SQLite, db, run and Backups](https://basemodo.com/docs/data)