# Backup pack: timestamped ZIP backups, restore and rotation

> Backup Manager zips your project with a timestamp, lists, restores and rotates the archives with four slash commands. Install, five prompts, where files go, what is excluded and what is not covered.

Canonical: https://bmad-plus.rochetta.fr/docs/packs/backup/
Language: en
BMAD+ version: 0.23.1
Documentation reviewed: 2026-10-19
Author: Laurent Rochetta
License: MIT

BMAD+ documentation › [Packs](https://bmad-plus.rochetta.fr/docs/packs/) › Backup pack: timestamped ZIP backups, restore and rotation

The Backup pack installs Backup Manager, an agent that makes a ZIP copy of your project in one command, names it with the date and time, lists the copies, restores one on request and prunes the old ones. It exists for the moment before a risky change, a big refactor or a migration, when you want a quick way back that does not depend on version control. It is deliberately simple: it runs your operating system’s own zip tooling and keeps the archives in a `backups/` folder inside the project.

<a id="when-to-use"></a>
## When to use it

- Before a large refactor, a dependency upgrade, a data migration or an autopilot run.
- For projects that are not under version control, or whose uncommitted state matters.
- It does not replace real backups: see the limits below.

<a id="installed"></a>
## What is installed

A packaged pack in `.agents/skills/pack-backup/`: the agent file `backup-agent.md` and a workflow template `templates/backup-workflow.md`. No skill, no data file and no script is shipped: the agent writes the commands itself, in PowerShell on Windows or Bash on Linux and macOS, and replaces the `%PROJECT_ROOT%` placeholder with your real project path.

**Backup Manager menu**

| Command | What it does |
| --- | --- |
| `/backup` | Full backup: a timestamped ZIP of the whole project, with the exclusions below |
| `/backup-list` | Lists the ZIP files in `backups/`, newest first, with size and date |
| `/backup-restore` | Extracts a chosen ZIP into a new `restore_<timestamp>/` folder in the project root |
| `/backup-clean` | Rotation: keeps the last N archives (5 unless you say otherwise) and deletes the rest, after asking you |

<a id="quick-start"></a>
## Quick start

1. **Install the pack** Core is added automatically. Only Node.js 20 is needed for the installer.

   ```sh
   npx bmad-plus install --packs backup
   ```
2. **Make a first backup** The agent finds the project root, detects your operating system, creates `backups/` if needed, builds the archive and reports its name and size.

   ```sh
   /backup
   ```
3. **Ignore the folder in version control** The archives are plain project data, so keep them out of commits.

   ```sh
   backups/
   ```

<a id="examples"></a>
## Copyable examples

<a id="example-backup-create"></a>
### Make a timestamped backup

Run it before anything you might want to undo.

**In your AI assistant**

```text
/backup, then list what you left out of the archive so I can check that nothing I need is missing.
```

**What you should get** A file `backups/<project>_backup_<yyyyMMdd_HHmmss>.zip` is created, and the agent reports its name and size in megabytes. At the project root it excludes `node_modules`, `.git`, `vendor`, `backups/`, `__pycache__` and files matching `*.backup_*`, which is the list the agent can read back to you.

<a id="example-backup-before-refactor"></a>
### Back up in plain language before a risky change

You can call the agent by name and ask in plain words instead of typing the slash command.

**In your AI assistant**

```text
Backup Manager, make a backup of this project before I rename the src/ modules, and tell me the size of the archive.
```

**What you should get** The same archive as `/backup`, with the file size shown. Showing the size is one of the agent’s rules; on Linux and macOS the reference command prints only the archive name, so the agent has to add the size itself.

<a id="example-backup-list"></a>
### List the backups you have

Use it to pick which archive to restore or prune.

**In your AI assistant**

```text
/backup-list
```

**What you should get** A table of the `*.zip` files in `backups/`, sorted by last write time (newest first), with name, size in megabytes and date.

<a id="example-backup-restore"></a>
### Restore without overwriting your work

Restoring goes to a separate folder, so you can compare before you copy anything back.

**In your AI assistant**

```text
/backup-restore the most recent archive
```

**What you should get** The ZIP is extracted into `restore_<yyyyMMdd_HHmmss>/` at the project root and the agent prints that path. Your current files are not touched; copy back what you need.

<a id="example-backup-clean"></a>
### Keep only the latest few backups

Rotation deletes files, so the agent always asks for confirmation first.

**In your AI assistant**

```text
/backup-clean keep the last 3.
```

**What you should get** After you confirm, archives older than the three most recent are deleted from `backups/` and the agent reports how many were kept. Without a number the default is 5.

<a id="outputs"></a>
## What it writes and where

**Files and folders created by the pack**

| Path | Created by | Content |
| --- | --- | --- |
| `backups/` | `/backup` | The archives, named `<project>_backup_<yyyyMMdd_HHmmss>.zip` |
| `restore_<yyyyMMdd_HHmmss>/` | `/backup-restore` | The extracted copy of one archive |

<a id="data-and-prerequisites"></a>
## Data flows and prerequisites

- Windows: PowerShell with `Compress-Archive` and `Expand-Archive`. Linux and macOS: Bash and the `zip` program, which must be installed.
- Your host tool must allow the agent to run shell commands. Nothing leaves your machine: no upload, no network call, no key.

<a id="limits"></a>
## Limits and gotchas

> **Warning · This is not a disaster-recovery backup** The archives sit inside the project, on the same disk. A lost disk loses both. The pack does not schedule backups, encrypt them or copy them elsewhere. Copy important archives to another location yourself.

> **Warning · The Git history is not in the archive** `.git` is excluded, so a restore brings back files, not commits or branches. Dependencies in `node_modules` and `vendor` are excluded too: reinstall them after a restore.

> **Note · Exclusions name top-level folders** The PowerShell command filters the entries at the project root only, and the Bash patterns are written for root folders, so the exclusions apply at the project root only. A nested `node_modules` (for example in `packages/app/`) may therefore end up in the archive. Check the size the agent reports, and tell it to exclude more if needed.

> **Note · Command names to use** The menu is `/backup`, `/backup-list`, `/backup-restore` and `/backup-clean`. There is no `create` subcommand: `/backup` alone makes the archive.

> **Note · Provenance** The Universal Backup pack was written by Laurent Rochetta at Oveanet, his company, and integrated into BMAD+.

**See also**

- [All ten packs side by side](https://bmad-plus.rochetta.fr/docs/packs/packs-overview/)
- [Install, update, uninstall](https://bmad-plus.rochetta.fr/docs/guides/install-lifecycle/)
- [update command (its own receipts and restore)](https://bmad-plus.rochetta.fr/docs/reference/cli-update/)

[BMAD+ documentation](https://bmad-plus.rochetta.fr/docs/) · [Packs](https://bmad-plus.rochetta.fr/docs/packs/)

[Source on GitHub](https://github.com/lrochetta/BMAD-PLUS)
