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

Restic still ask for password when is set to .bashrc #2625

Closed
RafaelAybar opened this issue Mar 6, 2020 · 3 comments
Closed

Restic still ask for password when is set to .bashrc #2625

RafaelAybar opened this issue Mar 6, 2020 · 3 comments

Comments

@RafaelAybar
Copy link

Output of restic version

restic 0.9.6 compiled with go1.13.4 on linux/amd64

How did you run restic exactly?

restic -r backups/ snapshots

What backend/server/service did you use to store the repository?

I store the backups in local machine, in backups directory

Expected behavior
-----------------
restic -r backups/ snapshots
repository a59cec13 opened successfully, password is correct
ID        Time                 Host        Tags        Paths
-----------------------------------------------------------------------------------------------------
94b78cGh  2020-03-05 13:24:10  osw                     /var/www/standard
-----------------------------------------------------------------------------------------------------
1 snapshots

I want that restic reads the RESTIC_PASSWORD properly
I have set the RESTIC_PASSWORD in .bashrc file in order to let cron do backups automatly, but always ask for a password if I do not do RESTIC_PASSWORD=$RESTIC_PASSWORD

Actual behavior

Restic ask for a passwod

Steps to reproduce the behavior

Set restic password in .bashrc and then run source ~/.basrc and run restic -r /foo snapshots

Do you have any idea what may have caused this?

No

Do you have an idea how to solve the issue?

I have solved with this workaround export RESTIC_PASSWORD=$RESTIC && restic -r ....

@RafaelAybar RafaelAybar changed the title Restic stillask for password when is set to .bashrc Restic still ask for password when is set to .bashrc Mar 6, 2020
@dimejo
Copy link
Contributor

dimejo commented Mar 6, 2020

I've just tried it out and it's working for me. Maybe you have a typo in your .bashrc?

@MichaelEischer
Copy link
Member

@RafaelAybar You also need to export RESTIC_PASSWORD in your bashrc. Otherwise bash won't pass on the environment variable to restic.

@RafaelAybar
Copy link
Author

RafaelAybar commented Mar 12, 2020

I've just tried it out and it's working for me. Maybe you have a typo in your .bashrc?

No, but i need to export RESTIC_PASSWORD=$RESTIC_PASSWORD when I log out and log in again

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

3 participants