Remove backup from specific client from restic REST server

Hello, I have this restic REST server docker-compose.yml:

---

services:
  restic_rest_server:
    image: restic/rest-server:latest
    container_name: restic_rest_server
    volumes:
      - ./data:/data
    env_file:
      - .env
    ports:
      - "127.0.0.1:${PORT}:8000"

Works well, restic clients do backup there.

But I suddenly lost a key for one of my client. I want to remove this specific backup from rest-server, but how do I determine what to remove? In ls data/keys, there are list of keys that are not presented in restic config (in fact, I use autorestic but that does not change much).

How do I remove this specific client data?

P. S. I cannot change the url it backups to. It is set to <restic_rest_server_url>/<hostname> for each client and that’s it.

Just go to the rest REST server container and do:

rm -rf /data/<your_client_hostname>/*

- and that’s it.

2 Likes

If you delete all the contents of that folder, there’s little point in keeping the folder itself, so might as well make it rm -rf /data/<your_client_hostname>.

1 Like