Using local USB drives for repositories failing

Hi, I am a newbie that is trying to setup first test backups so I could move away from Duplicati.

In this scenario I am running on Windows 11, with the backup drive destination being a local USB drive. When I specify the location for the repository as “E:\folder1” I tested 2 scenarios:

  1. Folder1 exists and is empty → bunch of subfolders are created (data, index, keys, locks, snapshots)

  2. Folder1 does not exist → it is created and all of the same subfolders are created as well.

However, after about 60 seconds it all ends with an error:

[unknown] failed to init repo: command “C:\Program Files\Backrest\restic.exe init --json -o sftp.args=-oBatchMode=yes” failed: exit status 1
Output:
{“message_type”:“exit_error”,“code”:1,“message”:“Fatal: create repository at e:\b2 failed: Fatal: unable to open repository at e:\b2: mkdir e:\b2\data\0c: A device which does not exist was specified.\n”}

Are there any known issues or limitations with created rep. on a USB? It obviously finds the destination, creates the folder structure but fails. Sorry if this is basic - just trying to learn…

This generally works. I use USB drives from time to time and while it’s not the safest possible solution, it works without problems.

Can you check whether you can copy normal files to that hard disk? Are the permissions set correctly? What if you make a backup repo on your c: drive and use that for a test?

Windows 11 might be putting the USB drive into some kind of sleep mode. Maybe you should check the controller settings?

Thanks, I moved the USB drive inside the PC - that worked fine. Moved it backed out as a USB and the same issue again. I looked at the sleep settings and nothing obvious and since during the inti phase the directories are created and the error comes within 60 seconds I don’t think that’ the issue. :frowning:

Any other ideas please?

Details

Snapshot ID: f5b703c5

User and Host

WORKGROUP\S$@S

Tags

plan:test1, created-by:TV-HOME

Files Added

398

Files Changed

0

Files Unmodified

0

Bytes Added

3.08 GiB

Total Bytes Processed

3.1 GiB

Does copying large amounts of data to the USB drive in Windows Explorer work?

Perhaps try a different USB port? If this is a desktop, and you’re using the front panel ports, use one of the rear panel ones, if you’ve got multiple types (e.g. some are USB 3, some are USB 3.1) maybe try a different type? If this is a laptop, and it has a yellow port, or one marked with a power symbol, make sure you’re using that one, as it should supply more power than the others if the USB drive needs it.

If it worked inside the PC, but doesn’t work outside the PC, that strongly indicates the problem is with the USB connection, rather than with the drive, or restic. Possibly the USB port isn’t able to provide enough power to fully satisfy the drive, that’s fairly common with spinning hard disks.

Nicnab’s suggestion of trying to stress the USB drive by copying files (and perhaps reproduce the problem) is also a good idea.

“Any other ideas please?”: I have been using restic to backup W10 then W11 to an external usb disk drive for a couple of years and it works.

  1. I have noticed that my virus checker (bitdefender) will try to scan the drive every time it is plugged into the usb port. Perhaps yours is grabbing with exclusive control and won’t let you use it until the scan is finished which might be a few minutes.

  2. A small but for thoroughness, I have to ask, you need to check, is the drive full? In Explorer right click on the drive and click properties. Check if there is room. check to see if the drive itself is password protected.

  3. Look to see if there is on the drive a $Recycle.Bin. If it is there it may be full of things you no longer need filling up the drive.

Hope this helps.

2 Likes