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

Initialization failed with sftp backend #72

Closed
varac opened this issue Feb 4, 2021 · 3 comments
Closed

Initialization failed with sftp backend #72

varac opened this issue Feb 4, 2021 · 3 comments

Comments

@varac
Copy link

varac commented Feb 4, 2021

I can't get resticker to work with a sftp backend (synonlogy NAS):

root@rock:~/resticker# docker-compose up
WARNING: The aW variable is not set. Defaulting to a blank string.
Starting resticker_backup_1 ... done
Attaching to resticker_backup_1
backup_1  | Checking configured repository 'sftp://xxx@abc.de/home/restic'...
backup_1  | Fatal: unable to open config file: Lstat: file does not exist
backup_1  | Is there a repository at the following location?
backup_1  | sftp://xxx@abc.de/home/restic
backup_1  | Could not access the configured repository. Trying to initialize (in case it has not been initialized yet) ...
backup_1  | Fatal: create repository at sftp://xxx@abc.de/home/restic failed: failed to send packet: write |1: file already closed
backup_1  | 
backup_1  | Initialization failed. Please see error messages above and check your configuration. Exiting.
resticker_backup_1 exited with code 1

My docker-compose.yml:

version: "3.3"

services:
  backup:
    image: mazzolino/restic
    hostname: docker
    environment:
      RUN_ON_STARTUP: "true"
      BACKUP_CRON: "0 30 3 * * *"
      RESTIC_REPOSITORY:  'sftp://xxx@abc.de/home/restic'
      RESTIC_PASSWORD: 'xxx'
      RESTIC_BACKUP_SOURCES: /mnt
      RESTIC_BACKUP_ARGS: >-
        --tag rock
        --exclude='.nodenv/versions'
        ...
        --verbose
      RESTIC_FORGET_ARGS: >-
        --keep-last 10
        --keep-daily 7
        --keep-weekly 5
        --keep-monthly 12
      TZ: Europe/Berlin
    volumes:
      - /:/mnt/:ro
      - ./known_hosts:/root/.ssh/known_hosts
      - /root/.ssh/borgbackup_key:/root/.ssh/id_rsa:ro

Any ideas how to fix/troubleshoot this ?

@varac
Copy link
Author

varac commented Feb 4, 2021

Fyi, on the NAS I could see a restic directory structure beeing created.

@varac
Copy link
Author

varac commented Feb 4, 2021

Also, changing the RESTIC_BACKUP_ARGS --verbose to --verbose=10 doesn't produce any more output. Might it be that the --verbose flag is completely ignored since it's applied after the backup subcmd, whereas restic expects the --verbose flag/option before the backup subcmd ?

@varac
Copy link
Author

varac commented Feb 4, 2021

Nevermind, I realized I hit this restic bug with too old sftp servers.
Works well on a newer sftp server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants