Can't restore from linux to Windows

I have a linux box that backs up files from a windows share folder. When I try and do a restore I get a failure and it does not restore back to the original location. I can restore the files to the linux box. I can then copy and paste from the linux box to the folder in the windows box (so I know permissions are ok) but duplicati can’t restore to the windows box directly and in one config restores locally to the home folder.

I have tried:

  1. “Restore to the original location” (overwrite and Restore read/write permissions). Result: I get a bunch of warnings. No files or folders are restored to the windows box & I get the warnings that are appended at the bottom of this message. Original location is a mounted drive /mnt/shares/share

  2. Direct Restore From Backup and then choose the windows location smb:///vm/
    Result: Does not restore to the windows box. However Does create a local folder in “home” called “SMB:” where the restore files are. I can then copy & paste from that folder to the exact location (smb://ip of windows box/vm/) I instructed duplicati to use via linux “File Manager”

Log 1. “Restore to the original location”

FilesRestored: 0 
SizeOfRestoredFiles: 0 
FoldersRestored: 364
SymlinksRestored: 0
FilesPatched: 0
FilesDeleted: 0 
FoldersDeleted: 0 
SymlinksDeleted: 0 
MainOperation: Restore 
RecreateDatabaseResults: null 
ParsedResult: Warning 
EndTime: 7/25/2018 10:13:06 AM (1532538786) 
BeginTime: 7/25/2018 10:12:08 AM (1532538728) 
Duration: 00:00:58.1593630 
Messages: [ Searching backup 0 (7/23/2018 9:57:37 PM) ..., 203 remote files are required to restore, Failed to restore 9384 files ] 
Warnings: [ Failed to create folder: "/mnt/shares/share/old family computer backup1/", message: Access to the path "/mnt/shares/share/old family computer backup1" is denied. => Access to the path "/mnt/shares/share/old family computer backup1" is denied., Failed to create folder: "/mnt/shares/share/old family computer backup1/webpage/", message: Access to the path "/mnt/shares/share/old family computer backup1" is denied. => Access to the path "/mnt/shares/share/old family computer backup1" is denied., Failed to create folder: "/mnt/shares/share/old family computer backup1/webpage/pics/", message: Access to the path "/mnt/shares/share/old family computer backup1" is denied. => Access to the path "/mnt/shares/share/old family computer backup1" is denied., Failed to create folder: "/mnt/shares/share/old family computer backup1/tmep/", message: Access to the path "/mnt/shares/share/old family computer backup1" is denied. => Access to the path "/mnt/shares/share/old family computer backup1" is denied., Failed to create folder: "/mnt/shares/share/old family computer backup1/tmep/Adult/", message: Access to the path "/mnt/shares/share/old family computer backup1" is denied. => Access to the path "/mnt/shares/share/old family computer backup1" is denied., ... ] Errors: [] BackendStatistics: RemoteCalls: 204 
BytesUploaded: 0
 BytesDownloaded: 10589793982 
FilesUploaded: 0 
FilesDownloaded: 203 
FilesDeleted: 0 
FoldersCreated: 0 
RetryAttempts: 0 
UnknownFileSize: 0
 UnknownFileCount: 0
 KnownFileCount: 407 
KnownFileSize: 10598293677 
LastBackupDate: 7/23/2018 2:57:37 PM (1532383057) 
BackupListCount: 1 
TotalQuotaSpace: 237105086464 
FreeQuotaSpace: 126277029888 
AssignedQuotaSpace: -1 
ReportedQuotaError: False 
ReportedQuotaWarning: False 
ParsedResult: Success

Log of Direct Restore From Backup and then choose the windows location smb://ip of windows box/vm/

FilesRestored: 9384 
SizeOfRestoredFiles: 10723735341
 FoldersRestored: 364
 SymlinksRestored: 0
 FilesPatched: 0
 FilesDeleted: 0
 FoldersDeleted: 0 
SymlinksDeleted: 0 
MainOperation: Restore 
RecreateDatabaseResults: null 
ParsedResult: Warning 
EndTime: 7/25/2018 10:49:27 AM (1532540967) 
BeginTime: 7/25/2018 10:47:09 AM (1532540829) 
Duration: 00:02:17.4678180 
Messages: [ Searching backup 0 (7/23/2018 9:57:37 PM) ..., 203 remote files are required to restore ] Warnings: [ Failed to apply metadata to file: "smb://192.168.1.200/vm/old family computer backup1/tmep/pics/", message: Operation not permitted => Operation not permitted, Failed to apply metadata to file: "smb://192.168.1.200/vm/old family computer backup1/pics/05.jpg", message: Operation not permitted => Operation not permitted, Failed to apply metadata to file: "smb://192.168.1.200/vm/old family computer backup1/tmep/08.jpg", message: Operation not permitted => Operation not permitted, Failed to apply metadata to file: "smb://192.168.1.200/vm/old family computer backup1/tmep/10.jpg", message: Operation not permitted => Operation not permitted, Failed to apply metadata to file: "smb://192.168.1.200/vm/old family computer backup1/tmep/1003070893.jpg", message: Operation not permitted => Operation not permitted, ... ] 
Errors: [] 
BackendStatistics: 
RemoteCalls: 204 
BytesUploaded: 0 
BytesDownloaded: 10589793982 
FilesUploaded: 0 
FilesDownloaded: 203 
FilesDeleted: 0 
FoldersCreated: 0 
RetryAttempts: 0 
UnknownFileSize: 0 
UnknownFileCount: 0 
KnownFileCount: 407 
KnownFileSize: 10598293677 
LastBackupDate: 7/23/2018 2:57:37 PM (1532383057) 
BackupListCount: 1 
TotalQuotaSpace: 237105086464 
FreeQuotaSpace: 126209757184 
AssignedQuotaSpace: -1 
ReportedQuotaError: False 
ReportedQuota
Warning: False Parsed
Result: Success

I’m not sure I follow the situation, can you tell me if I’ve got this right?

  • Duplicati running on the Linux box is backing up Windows files from a mount point on the linux box

  • When running Restore on the Linux box you are restoring back over the Linux mount point

I just want to make sure I’m following so I can try a quick test of the same situation.

Yes Duplicati is running on a linux box backing up windows files from a mount point on the linux box

  • backups work fine
    -Duplicati can restore to somewhere on the linux box (example /home/tech/Downloads)
    -Duplicati running from the linux box can not restore to the mount location
    -Duplicati can not restore to smb://windowsbox/originallocation

I can restore locally to the linux box (/home/tech/downloads) then on the linux box copy and paste to the windows box via smb and/or the mount point.

Hi @kazoo

I’ll start with what I hope is the easier one. :wink: Your #2 is because Duplicati doesn’t support SMB URL syntax. Actually, it doesn’t support SMB by itself, but might someday. On Windows, SMB support is by the filesystem, therefore it even works at a Command Prompt. A Linux shell can’t do that. Your File Manager (is it Nautilus?) appears to do the necessary mounts on your behalf. Duplicati needs mount help. What options did you set?
Running the mount command with no options (or doing cat /proc/mounts) will get a list you can pick from.

Typically a file manager would run as an ordinary user. Is Duplicati running as root or you on the failing test?

For issues that look like access, I may ask what Duplicati is running as, then ask for a manual test from shell.
For example, can you, as whatever Duplicati is, make directories and files (new ones to be safe) in the area?
If that works, then the next test would be existing files, but test on a nonessential one if you’re uncomfortable.

Thanks!

Okay…linux newbie learner here, so not sure some of what your asking or how to check. The File manager is Thunar 1.6.11 (I’m using linuxlite).
When you asked what option i set I’m assuming you mean when I set the mount point. I did:
sudo mount.cifs //main-pc/users/Main/Downloads/test/ /mnt/shares/main -o user=main,pass=mypassword

When I run the cat /proc/mounts I get a bunch of info but one thing I do see is mount.cifs: permission denied: no match for /mnt/shares/main found in /etc/fstab but it’s a long list…should I post it here?

As for if Im running Duplicati as root…I believe I am. I run ps -elf|grep root and I see duplicati.server.exe

After doing some research I found from the command line if I run: sudo mount -t cifs -0 \user=main,password=mypassword //192.168.1.190 /mnt/shares/main I could then from the command line create a file or directory.

Duplicati starts automatically…how can I start it as root? What else should I do? Thanks for the help

Holy Canoles…I got it to work but not sure what I did. Rebooted the linux box. Shutdown duplicati from starting automatically. Ran sudo duplicati from cli. Says server has started listening on 0.0.0.0, port 8300 then just a blinking box. Opened a 2nd cli typed sudo mount -t cifs -o user=main,password=mypassword //192.168.1.190 /test /mnt/shares/laptop

Tested a restore and the files showed up. Which is Awesome & Thank You. Now how am I suppose to get this to happen automatically when the box boots? Do I save the mount info to fstab? What about how to get duplicati to boot automatically as root?

Thanks

Great job getting it going (at least provisionally) and confirming it was a permissions (not Duplicati) issue!

I use LinuxLite myself but am nowhere near the level of ts678. :-). That being said, if you don’t want the mount point always there, you could try adding the mount (and unmount) to --run-script-before and --run-script-after, um, scripts.

Hi @kazoo

Sorry about the delay. I wasn’t clear on the results, and also had to try Installing Duplicati on Ubunutu Linux by @JonMikeIV (although my Linux VM isn’t Linux Lite). The How-To above covers both starting Duplicati at your login (presumably to run as you), and running at boot as a service as root. The service option gets little help from the installer on Windows, and it looks like Linux is the same way. How much do you need this? There’s a benefit from having Duplicati always up, but it does make the picture more complex. Let me explain that some.

How to make Duplicati start automatically with Ubuntu? discusses some of the issues, and shows (but doesn’t discuss) one of the perils. Duplicati can run multiple servers, although you usually wouldn’t need to. The first gets localhost:8200, the next localhost:8300, and so on. The tray Icon hosts a server by default, however the --no-hosted-server option stops it, and is often what you want if you want to use the server that starts at boot.

Duplicati components and Duplicati.GUI.TrayIcon.exe discuss some of this, if you’re not already familiar with it.

If you look inside the /usr/bin/duplicati script, you’ll see it running Tray Icon. It looks like added options simply go at the end, however I’m not sure where you’d put options if you’re using Application Autostart as shown in the link. I haven’t really looked. This reminds me a bit of how to add options to a Windows Tray Icon shortcut.

The results from cat /proc/mount sound weird. There shouldn’t be an error message in the middle of the cat output, although sometimes a process running in the background can intermix output with the foreground process. One guess is that came from your mount.cifs, and the mount -t didn’t show it. Basically, the cat was just to see what the system thought it was supposed to use for its mount, in case you were having problems. Putting the whole thing up probably isn’t necessary, but output talking about smb or cifs might be interesting, although somebody else could possibly get further than I could with explaining exactly how to do your mount.

If the goal is mounts at boot time, it looks like the typical Linux distribution still has one put manual entries in /etc/fstab. I’m not set up to do Linux network mounts, but you probably have man pages for things like fstab and mount. Web sites can offer help. JonMikeIV suggested how to limit the mount to Duplicati’s run. Another (advanced) option might be to automount it only as needed, but I’m not sure there would be any advantage.

I’d note that many people here recommend Duplicati on the source host, rather than the destination as here, however I’m not sure if I’ve found a weighing of all the issues, and perhaps you have reason to prefer yours.

So there’s kind of a shotgun response, partly to save some back-and-forth. I hope this helps with your setup.