Skip to content

Commit f24deae

Browse files
committed
feat(backup): Simplify backup commands in README and update retention policy usage
1 parent 4391661 commit f24deae

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

immich/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,31 @@ openssl rand -base64 32
173173
#### List Existing Snapshots
174174

175175
```bash
176-
docker compose run --rm immich-backup restic snapshots
176+
docker compose run --rm immich-backup snapshots
177177
```
178178

179179
This will list all backup snapshots. If the repository doesn't exist yet, it will be initialized automatically on the first scheduled backup.
180180

181181
#### Manually Trigger a Backup
182182

183+
Perform a one-time backup:
184+
185+
```bash
186+
docker compose run --rm immich-backup backup /data
187+
```
188+
189+
Then apply the retention policy to clean up old snapshots:
190+
183191
```bash
184-
docker compose run --rm immich-backup /bin/bash -c 'restic backup /data && restic forget --prune ${RESTIC_FORGET_ARGS}'
192+
docker compose run --rm immich-backup c forget --prune --keep-last 7 --keep-daily 7 --keep-weekly 4 --keep-monthly 3
185193
```
186194

195+
(Note: Replace the `--keep-*` arguments with your configured `RESTIC_FORGET_ARGS` from `backup.env`)
196+
187197
#### Check Repository Status
188198

189199
```bash
190-
docker compose run --rm immich-backup restic check
200+
docker compose run --rm immich-backup check
191201
```
192202

193203
#### Monitor Scheduled Backups
@@ -219,7 +229,7 @@ For detailed instructions on restoring Immich from backups, see the [Immich Rest
219229
To restore a specific snapshot:
220230

221231
```bash
222-
docker compose run --rm immich-backup restic restore <snapshot-id> --target /restored
232+
docker compose run --rm immich-backup restore <snapshot-id> --target /restored
223233
```
224234

225235
Then copy the files and database from `/restored` back to their original locations.

0 commit comments

Comments
 (0)