I would like to migrate my backup repo from one google drive to another google drive.
I have already copy the restic repo from google drive #1 to google drive #2.
But when I edit my --repository-file to reflect the new google drive (rclone:gdrive1:Backup/Restic/ → rclone:gdrive2:Backup/Restic/), I get an error:
Fatal: parsing repository location failed: invalid backend
If the repo is in a local directory, you need to add a local: prefix
restic version
restic 0.16.0 compiled with go1.20.6 on linux/amd64
sudo restic --repository-file /etc/restic/home --password-file /etc/restic/secret/home check --read-data-subset=2.5%
using temporary cache in /tmp/restic-check-cache-1404901381
Fatal: parsing repository location failed: invalid backend
If the repository is in a local directory, you need to add a local: prefix
I removed the commented line in repository-file, that’s indeed better, if not working yet:
sudo restic --repository-file /etc/restic/home --password-file /etc/restic/secret/home check --read-data-subset=2.5%
using temporary cache in /tmp/restic-check-cache-3352847845
rclone: 2023/09/04 13:49:25 Failed to create file system for “gdrive2:Backup/Restic/rm-work-T470/”: didn’t find section in config file
Fatal: unable to open repository at rclone:gdrive2:Backup/Restic/rm-work-T470/: error talking HTTP to rclone: exit status 1
Actually a gdrive2 remote was defined… but not for root/sudo user!
So I added the remote into /root/.config/rclone/rclone.conf
I need to wait for tomorrow to be able to test (because of userRateLimitExceeded), but now it should be alright.
Thanks kapitainsky for you kind help!
One could also add capabilities to the restic binary so you don’t have to run restic via sudo.
This is described here: Examples — restic 0.16.0 documentation