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

rclone failed to create config file #67

Closed
whyb0rn opened this issue Jul 21, 2023 · 2 comments
Closed

rclone failed to create config file #67

whyb0rn opened this issue Jul 21, 2023 · 2 comments

Comments

@whyb0rn
Copy link

whyb0rn commented Jul 21, 2023

By default, rclone.conf file is located in the /data/rclone.conf folder, data folder in backup container is mounted as read-only, so rclone cannot create or modify the configuration file.
Solution: change the path to rclone.conf and give the folder where the configuration file is located write permissions.
Example: in .env change the line BACKUP_RCLONE_CONF=/data/rclone.conf to BACKUP_RCLONE_CONF=/data/rclone/rclone.conf and in docker-compose.yml add - ${PWD}/bitwarden/rclone:/data/rclone to volumes:

@dadatuputi
Copy link
Owner

dadatuputi commented Jul 22, 2023

That's not a bad solution, except I'm worried about those who have it in the old location getting a new docker-compose and not updating their .env and moving the file.

I'd like a solution that keeps backwards compatibility, especially when it comes to backups, but not sure there is one without being excessively hacky.

I did try to add a mount from ${PWD}/bitwarden/rclone.conf:/data/rclone/rclone.conf, however that fails to start when there is no rclone.conf in that location.

In the meantime I'm going to update the bitwarden mount to not be writable.

@dadatuputi
Copy link
Owner

I took another look at this, and came up with the changes as you suggested @whyb0rn-

Changes:

  • .env.template: move to new location
    • BACKUP_RCLONE_CONF=/data/rclone/rclone.conf
  • docker-compose.yml: make data read only, mount new rclone folder
    • ${PWD}/bitwarden:/data:ro
    • ${PWD}/bitwarden/rclone:/data/rclone
    • ${PWD}/bitwarden/backups:/data/backups

There are likely scenarios that I could imagine:

  • New users - use new compose and new env template: OK
  • Old users get the new compose - use new compose and old env: Probably OK
    • rclone.conf is still in /data which is READ ONLY. This will continue to work for backups until they update their rclone conf using the instructions in the wiki.
    • Resolution: Most old users won't have an issue. If they update their rclone.conf they will get a read-only error, and hopefully find the fix in the wiki.

I'm happy with this solution, and will be pushing the changes. Thanks @whyb0rn.

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

2 participants