Skip to main content

Getting started

Five minutes, one compose project, and one deliberate mistake to undo.

If you have not installed arcave yet, start at Installation.

What it shows: the cycle this page walks through — a savepoint, a dropped table, arcave rollback — and the rows are back.

1. Bring a compose project up​

arcave reads the running project from the Docker daemon — it never opens your compose file. So the project has to exist before arcave can do anything with it.

A minimal stateful project
docker compose up -d
docker compose ls # note the project name in the first column

Any project with a persistent volume works. The examples below assume a project named myapp with a Postgres service.

warning

docker compose stop is fine — a stopped container still describes the project. docker compose down is not: it removes the containers, so savepoint create has nothing to capture and fails saying so. A rollback still works on a torn-down project.

2. Initialise arcave​

arcave init

This writes .arcave/config.yaml and nothing else. It opens no storage and contacts no daemon — it is the one command that runs before arcave has a project to speak of.

.arcave/config.yaml
project:
name: myapp
common:
concurrency: 5
compose:
wait_timeout: 2m0s
stop_timeout: 10s
progress: log
storage:
type: directory
directory:
path: .arcave/storage
snapshot:
backend: fullcopy
writable_layers:
backend: dedupcopy
capture:
writable_layers: true
images: true
volumes:
named: true
bind: true
anonymous: true
rollback:
leftover_volumes: overwrite
backends:
fullcopy:
compression: zstd
log:
format: text

Every key but log.level is written out with its default, so the file doubles as a list of what you can change; Configuration explains each one. One flag is worth knowing now:

arcave init --name myapp # the storage tenant name

Without --name, the storage tenant is named after the current directory.

Savepoint data goes to .arcave/storage. To keep it elsewhere — another directory, an S3 bucket, an Azure container, an SFTP server — edit storage in .arcave/config.yaml; see Configuration.

You will want .arcave/ in your .gitignore.

3. Name the project once​

Every command that touches a compose project needs to know which one. Set it once for the shell instead of passing -p every time:

export ARCAVE_COMPOSE_PROJECT_NAME=myapp
note

-p/--project-name names the compose project, as docker compose ls lists it. That is a different thing from project.name in the config, which names the storage tenant. See Concepts — and note that the environment variable sets both.

4. Take your first savepoint​

arcave savepoint create before-migration

arcave stops the services, captures every volume, the image each service runs on and every container's writable layer, records the compose spec, commits the record, starts the services again, and waits for their health checks.

On a terminal you watch the steps as a live tree on stderr, and the result is printed as a summary. When stdout is a pipe or a file — or with --format json — the result is the savepoint record as JSON:

stderr + stdout
✔ savepoint.create before-migration 10.9s
├── ✔ project.introspect 0.1s
├── ✔ savepoint.hold 0.3s
├── ✔ savepoint.capture before-migration 4.2s
└── ✔ savepoint.release 6.1s

Savepoint before-migration · 019e843e-1650-7000-8000-000000000000 · 19:41:12 · stored 169 MB
count size stored
volumes 1 40.8 MB 3.9 MB
layers 1 159 MB 16.7 KB
images 1 658 MB 165 MB

roll back: arcave -p myapp rollback before-migration

size is what the savepoint holds and stored what it added to the store. The layer adds little because only what the container wrote over postgres:16 is new; the image is stored once and reused by every later savepoint. Anything the savepoint left out, or that puts its data at risk, is listed under Warnings. In the JSON, stats holds one entry per captured volume, writable_layers one per container, and images one per distinct image; a savepoint that left something out also carries not_covered. Output has every field.

rollback and savepoint remove take that id or the name.

5. Break something on purpose​

The mistake
docker compose exec -T db psql -U postgres -c 'DROP TABLE orders;'

6. Roll it back​

arcave rollback before-migration
stderr + stdout
✔ rollback before-migration 9.7s
├── ✔ project.introspect 0.1s
├── ✔ rollback.prepare 1.6s
├── ✔ rollback.safety-snapshot 3.9s
├── ✔ rollback.apply 3.1s
└── ✔ rollback.cleanup 0.0s

Rolled back to before-migration · 019e843e-1650-7000-8000-000000000000 · 2026-06-01 19:41:12
volumes 1
layers 1
safety taken

Warnings (1)
! the containers run on the savepoint's writable layers
→ `docker compose up` of your compose file recreates them on its images and drops those layers

undo it: arcave -p myapp rollback 019e8491-04c8-7000-8000-000000000000

In the JSON, rolled_back_to is the whole savepoint record, as savepoint create printed it. restored lists the volumes written back, and writable_layers the containers put back on their captured layer.

The table is back. So is everything else the project held at 19:41:12.

The db container now runs on an arcave/… tag rather than on postgres:16 — the warning above: a docker compose up from your compose file recreates the container on postgres:16 and drops the restored layer — roll back again to get it back.

Before overwriting anything, arcave took a safety snapshot of the state you are throwing away. If the restore had failed, or the services had come up unhealthy, arcave would have replayed that snapshot automatically and reported the error rather than leaving you between two states. It also stays afterwards, so you can undo the rollback: roll back to the id the result names. See How arcave works.

7. See what you have​

What the daemon runs now, and whether it all came up:

arcave status
stdout
myapp · running · savepoint before-migration (019e843e-1650-7000-8000-000000000000)
session baseline
deployed 2026-06-01 19:52 (12s ago)
savepoint taken 2026-06-01 19:41 (11m ago) · restored 1 volume, 1 layer

SERVICE REPLICAS STATE UP PORTS
db 1/1 healthy 10s 127.0.0.1:5432→5432/tcp

If something is down, or was rebuilt outside arcave since, a Warnings block below says what, each with a code that arcave status explains.

What the store holds:

arcave savepoint list
stdout
NAME ID CREATED VOLUMES LAYERS STORED NOT COVERED
before-migration 019e843e-1650-7000-8000-000000000000 2026-06-01 19:41 1 1 169 MB -

One row per savepoint — in the JSON a full savepoint record — newest first; --sort asc lists oldest first. The safety snapshot the rollback took is hidden here; --include-safety-snapshots lists it. It stays until arcave gc retires it.

8. Clean up​

arcave savepoint remove before-migration # by name, or by id
arcave savepoint remove --retain-recent 5 # keep the newest five
arcave savepoint remove --retain-for 7d --dry-run
arcave gc # free what they shared, retire old safety snapshots

savepoint remove deletes each savepoint's record and its own directory; what it shared with other savepoints — stored images and layers — and its cdc snapshots are freed by arcave gc. sp, ls and rm are shorter spellings: arcave sp ls, arcave sp rm before-migration — see Commands.

9. Branch off, if you need to​

Savepoints live in a session, baseline until you choose another. arcave session create --from baseline --name experiment copies the whole session into a new one, and arcave session set experiment makes the commands that follow work there. See Sessions and branching.

Tools and expertise for reproducible, production-like environments.
Copyright © 2026 Greenmask, Inc.
Privacy Policy