You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Question
System information. For client/server mode post info for both machines.
Client: WSL2, Debian 11, Windows 10 Pro
Server: Ubuntu 20.04.3
Your borg version (borg -V).
borg 1.1.17
Operating system (distribution) and version.
See above
Hardware / network configuration, and filesystems used.
How much data is handled by borg?
500GB
Full borg commandline that lead to the problem (leave away excludes and passwords)
borg create repo backupdir
borg list repo
Describe the problem you're observing.
I have a well tested script to automate the main borg functions I use. Repo location, backup dirs, keyfile, keyfile password are all managed either as bash variables or Borg envvars where applicable. I've never had any difficulties with this script.
I decided I wanted to replace the envvar BORG_PASSPHRASE with BORG_PASSPHRASE_FD and therefore implemented the following in my backup script:
I have a read-only text file, 'conf_file', which has the keyfile passwords for the different repos I backup to. The format of the file is:
[repo1]:[passwd1]
[repo2]:[passwd2]
etc
my borg script takes the flag '-r' to designate the repo name which becomes the variable $repo_name. Therefore ./borgscript.sh -r repo1 --> repo_name="repo1"
To extract the correct password from conf_file and write it to an FD I do the following:
a) exec 37>file
b) echo $(grep -o $repo_name'.*' conf_file | cut -f2- -d':') >&37 [this matches the repo name and returns the string after the delimiter ':' which is the password]
c) export BORG_PASSPHRASE_FD=37
These changes above replace the previous method which was export BORG_PASSPHRASE. Otherwise nothing has been change from the script which was working just fine.
As a test, if don't use the script but rather manually create and populate the FD and then run 'cat 37' the console output is indeed the correct password for $repo_name.
Furthermore, if I don't use the script at all but manually enter in all the variables necessary to run borg list repo first using the old method, export BORG_PASSPHRASE and then using export BORG_PASSPHRASE_FD=, the first method works, the second doesn't.
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Yes, manually entering the commands.
Include any warning/errors/backtraces from the system logs
Local Exception
Traceback (most recent call last):
File "borg/archiver.py", line 4703, in main
File "borg/archiver.py", line 4635, in run
File "borg/archiver.py", line 164, in wrapper
File "borg/helpers.py", line 382, in load
File "borg/crypto/key.py", line 134, in key_factory
File "borg/crypto/key.py", line 594, in detect
File "borg/crypto/key.py", line 438, in env_passphrase
File "borg/crypto/key.py", line 461, in fd_passphrase
OSError: [Errno 9] Bad file descriptor
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Question
System information. For client/server mode post info for both machines.
Client: WSL2, Debian 11, Windows 10 Pro
Server: Ubuntu 20.04.3
Your borg version (borg -V).
borg 1.1.17
Operating system (distribution) and version.
See above
Hardware / network configuration, and filesystems used.
How much data is handled by borg?
500GB
Full borg commandline that lead to the problem (leave away excludes and passwords)
borg create repo backupdir
borg list repo
Describe the problem you're observing.
I have a well tested script to automate the main borg functions I use. Repo location, backup dirs, keyfile, keyfile password are all managed either as bash variables or Borg envvars where applicable. I've never had any difficulties with this script.
I decided I wanted to replace the envvar BORG_PASSPHRASE with BORG_PASSPHRASE_FD and therefore implemented the following in my backup script:
[repo1]:[passwd1]
[repo2]:[passwd2]
etc
a) exec 37>file
b) echo $(grep -o $repo_name'.*' conf_file | cut -f2- -d':') >&37 [this matches the repo name and returns the string after the delimiter ':' which is the password]
c) export BORG_PASSPHRASE_FD=37
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Yes, manually entering the commands.
Include any warning/errors/backtraces from the system logs
Local Exception
Traceback (most recent call last):
File "borg/archiver.py", line 4703, in main
File "borg/archiver.py", line 4635, in run
File "borg/archiver.py", line 164, in wrapper
File "borg/helpers.py", line 382, in load
File "borg/crypto/key.py", line 134, in key_factory
File "borg/crypto/key.py", line 594, in detect
File "borg/crypto/key.py", line 438, in env_passphrase
File "borg/crypto/key.py", line 461, in fd_passphrase
OSError: [Errno 9] Bad file descriptor
Platform: Linux DESKTOP-31MLCGH 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64
Linux: debian 11.2
Borg: 1.1.17 Python: CPython 3.7.11 msgpack: 0.5.6.+borg1
PID: 2008 CWD: /proc/1384/fd
sys.argv: ['borg', 'list', '--remote-path=borg1', 'ssh://repo.borg']
SSH_ORIGINAL_COMMAND: None
The text was updated successfully, but these errors were encountered: