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 Password with special characters cause restore to fail #6571

Open
3 tasks
onenhansen opened this issue Apr 23, 2024 · 1 comment
Open
3 tasks

Restic Password with special characters cause restore to fail #6571

onenhansen opened this issue Apr 23, 2024 · 1 comment

Comments

@onenhansen
Copy link
Contributor

Description
Using a restic password with special characters in it, such as $# will cause the restore options to fail. The backup operation will work properly however any restores will fail.

To Reproduce
Create a restic datastore with RESTIC_PASSWORD=abc123$# and try to create and restore a VM.

Expected behavior
Backup images should be restored properly, and the password should not get interpreted by bash at any point.

Details

  • Affected Component: Storage/Backups
  • Hypervisor: KVM
  • Version: 6.8.3

Additional context

oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ cat restic.txt 
NAME="restic-test"
TYPE="BACKUP_DS"

DS_MAD="restic"
TM_MAD="-"

RESTIC_PASSWORD="abc123$#"
RESTIC_SFTP_SERVER="192.168.150.1"
oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ onedatastore create restic.txt 
ID: 119

oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ onedatastore list --no-expand | grep restic-tes
 119 restic-tes  83.2G 84% 0             1 bck  restic  -       on
oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ onevm backup 185 -d 119
oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ oneimage list --no-expand | grep 185
 281 oneadmin oneadmin 185 23-Apr 16.1 restic-tes    172M BK   Yes rdy     1
oneadmin@ubuntu2204-kvm-qcow2-6-8-bxeps-0:~$ oneimage restore 281 -d 1 --no_ip --no_nic --name restore-test 
[one.image.restore] Error restoring disk image: [one.image.allocate] Cannot parse image SIZE: Fatal: wrong password or no key found

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@onenhansen
Copy link
Contributor Author

The issue happens during backup actually, were the password is interpreted there. In the sample above where the password is set to abc123$#, if you change the password to abc1230 it will restore properly.

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

3 participants