EllyMae Member Jul 20, 2022 133 10 23 Aug 19, 2022 #1 Why is that happening? I proceed the backup command with export PBS_PASSWORD=<redacted> but it still asks for the password. Last edited: Aug 19, 2022
Why is that happening? I proceed the backup command with export PBS_PASSWORD=<redacted> but it still asks for the password.
Dunuin Distinguished Member Jun 30, 2020 14,796 4,780 258 Germany Aug 19, 2022 #2 Did you tried a export PBS_PASSWORD='<redacted>'? Last edited: Aug 19, 2022 Reactions: EllyMae
EllyMae Member Jul 20, 2022 133 10 23 Aug 19, 2022 #3 Dunuin said: Did you tried a export PBS_PASSWORD='<redacted>'? Click to expand... Well, I did echo $PBS_PASSWORD, and it gave me the correct answer. Here is the script: Code: export PBS_PASSWORD=<redacted> export PROXMOX_OUTPUT_NO_BORDER=1 sudo proxmox-backup-client backup \ root.pxar:/ \ home.pxar:/home \ --repository dan1@pbs@192.168.1.50:usb-8tb \ --ns rocky Last edited: Aug 19, 2022
Dunuin said: Did you tried a export PBS_PASSWORD='<redacted>'? Click to expand... Well, I did echo $PBS_PASSWORD, and it gave me the correct answer. Here is the script: Code: export PBS_PASSWORD=<redacted> export PROXMOX_OUTPUT_NO_BORDER=1 sudo proxmox-backup-client backup \ root.pxar:/ \ home.pxar:/home \ --repository dan1@pbs@192.168.1.50:usb-8tb \ --ns rocky
EllyMae Member Jul 20, 2022 133 10 23 Aug 19, 2022 #4 EllyMae said: Well, I did echo $PBS_PASSWORD, and it gave me the correct answer. Here is the script: Code: export PBS_PASSWORD=<redacted> export PROXMOX_OUTPUT_NO_BORDER=1 sudo proxmox-backup-client backup \ root.pxar:/ \ home.pxar:/home \ --repository dan1@pbs@192.168.1.50:usb-8tb \ --ns rocky Click to expand... This just popped into my head: By using sudo, did I change the context so that the exported variables are no longer visible? ... So, I took the sudo out of the script and executed the script with sudo (sudo ./pbsbackup). It worked perfectly. Last edited: Aug 19, 2022
EllyMae said: Well, I did echo $PBS_PASSWORD, and it gave me the correct answer. Here is the script: Code: export PBS_PASSWORD=<redacted> export PROXMOX_OUTPUT_NO_BORDER=1 sudo proxmox-backup-client backup \ root.pxar:/ \ home.pxar:/home \ --repository dan1@pbs@192.168.1.50:usb-8tb \ --ns rocky Click to expand... This just popped into my head: By using sudo, did I change the context so that the exported variables are no longer visible? ... So, I took the sudo out of the script and executed the script with sudo (sudo ./pbsbackup). It worked perfectly.
fabian Proxmox Staff Member Staff member Jan 7, 2016 12,047 3,265 303 Aug 19, 2022 #5 yes, sudo cleans up the environment (you can control that via --preserve-env, see man sudo) Reactions: EllyMae