> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run a manual backup

You can create a backup manually, on-demand. This is useful during “lift-and-shift” migrations or prior to upgrades.

## Prerequisite

* Before you perform a backup you must put Domino into maintenance mode. See the [domino-maintenance-mode readme](https://github.com/dominodatalab/domino-maintenance-mode/blob/main/README.md).

## Manually generate a backup

1. Run the following command to scale the domino-data-importer statefulset up to 1 replica:

   ```shell theme={null}
   platform_ns="$(kubectl get namespace -l domino-platform -o name)"
   platform_ns="${platform_ns#namespace/}"
   kubectl scale sts -n $platform_ns domino-data-importer --replicas=1
   ```

2. When the domino-data-importer pod is up, run the following code to exec into it:

   ```shell theme={null}
   kubectl -n $platform_ns exec -it domino-data-importer-0 /bin/bash
   ```

3. In the `domino-data-importer` pod, run the backup command:

   ```shell theme={null}
   importer backup --upload --archive --delete
   ```

   Remove the `--delete` flag if you want the backup bundle to remain on the local filesystem.

This command can take a long time, depending on the size of your backup. To prevent a timeout interrupting the command, Domino recommends using a terminal multiplexer tool like the container’s `/app/tmux` so that if your session is disconnected, the command continues running in the background and you can return to the session when you reconnect. For instructions about how to use `tmux`, see their website or man page `man tmux`.

Find the backup bundle in the [backup location](/6.3/admin/operations/backup-restore/backup-and-restore-overview) when it is generated automatically.

When the backup is done, scale the `domino-data-importer` statefulset back to `0`.
