Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to restore #163

Closed
SlyOwn opened this issue May 13, 2023 · 1 comment
Closed

Not able to restore #163

SlyOwn opened this issue May 13, 2023 · 1 comment

Comments

@SlyOwn
Copy link

SlyOwn commented May 13, 2023

Hello, I'm trying to restore but it doesn't work

my docker compose file:

version: "3.3"

services:
  backup:
    image: mazzolino/restic
    hostname: docker
    restart: unless-stopped
    environment:
      RUN_ON_STARTUP: "true"
      BACKUP_CRON: "0 30 3 * * *"
      RESTIC_REPOSITORY: /mnt/restic
      RESTIC_PASSWORD: supersecret
      RESTIC_BACKUP_SOURCES: /mnt/volumes
      RESTIC_BACKUP_ARGS: >-
        --verbose
      RESTIC_FORGET_ARGS: >-
        --keep-last 10
        --keep-daily 7
        --keep-weekly 5
        --keep-monthly 12
      TZ: Europe/Paris
    volumes:
      - /mnt/volumes:/mnt/volumes:ro
      - /mnt/restic:/mnt/restic

  prune:
    image: mazzolino/restic
    hostname: docker
    restart: unless-stopped
    environment:
      RUN_ON_STARTUP: "true"
      PRUNE_CRON: "0 0 4 * * *"
      RESTIC_REPOSITORY: /mnt/restic
      RESTIC_PASSWORD: supersecret
      TZ: Europe/Paris

  check:
    image: mazzolino/restic
    hostname: docker
    restart: unless-stopped
    environment:
      RUN_ON_STARTUP: "false"
      CHECK_CRON: "0 15 5 * * *"
      RESTIC_CHECK_ARGS: >-
        --read-data-subset=10%
      RESTIC_REPOSITORY: /mnt/restic
      RESTIC_PASSWORD: supersecret
      TZ: Europe/Paris

Here are my snapshots:

backup_1  | keep 2 snapshots:
backup_1  | ID        Time                 Host        Tags        Reasons           Paths
backup_1  | -------------------------------------------------------------------------------------
backup_1  | 8421200b  2023-05-13 15:45:28  docker                  last snapshot     /mnt/volumes
backup_1  | 5d311ad6  2023-05-13 15:48:32  docker                  last snapshot     /mnt/volumes
backup_1  |                                                        daily snapshot
backup_1  |                                                        weekly snapshot
backup_1  |                                                        monthly snapshot
backup_1  | -------------------------------------------------------------------------------------
backup_1  | 2 snapshots
backup_1  | 
backup_1  | Finished backup at 2023-05-13 15:48:34 after 2 seconds

Here is the error message and the restore command:

root@daniel-mint:/home/daniel/restic# docker-compose exec app restic restore 8421200b
ERROR: No such service: app
@SlyOwn
Copy link
Author

SlyOwn commented May 13, 2023

Problem solved!

I had to use docker:

docker exec -it restic_backup_1 restic restore 5d311ad6 --target /mnt/restic/getit

@SlyOwn SlyOwn closed this as completed May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant