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

Closed
3 tasks done
onenhansen opened this issue Apr 23, 2024 · 1 comment · Fixed by OpenNebula/docs#2991
Closed
3 tasks done

Restic Password with special characters cause restore to fail #6571

onenhansen opened this issue Apr 23, 2024 · 1 comment · Fixed by OpenNebula/docs#2991

Comments

@onenhansen
Copy link
Contributor

onenhansen commented Apr 23, 2024

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.

@tinova tinova added this to the Release 6.10.0 milestone Apr 23, 2024
@tinova tinova modified the milestones: Release 6.10.1, Release 6.10.0 Jul 23, 2024
@alpeon alpeon linked a pull request Jul 23, 2024 that will close this issue
2 tasks
@tinova tinova closed this as completed Jul 26, 2024
@tinova tinova reopened this Jul 26, 2024
@alpeon alpeon linked a pull request Jul 26, 2024 that will close this issue
2 tasks
tinova pushed a commit to OpenNebula/docs that referenced this issue Jul 26, 2024
@tinova tinova assigned 1gramos and unassigned alpeon Jul 26, 2024
@tinova tinova reopened this Jul 26, 2024
@dcarracedo dcarracedo removed this from the Release 6.10.3 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants