Running Duplicati beta in Manjaro

Nice work - found it. So those settings go at the end of the config then, not at the beginning. Kind of makes sense. I filled it out with the run script before command and went back in to confirm. It auto-populated the field/box with TRUE. See screenshots. So that should do it then.

I assume you have to put the link to the script you want to run there. Search the forum for examples, pretty sure there are some.

1 Like

Yes, @Wim_Jansen is correct - now you write the script you want to run to do the “is the USB drive connected?” check and have that script spit out the correct return code to tell Duplicati whether to continue with the backup, abort with notification, or abort silently.

I know - it’s not as simple as we’d like, we just haven’t gotten there yet. :slight_smile:

If I get some time I’ll try to post a sample windows batch file Until then, if you really feel like reading more on this, here’s an older topic that I think covered the subject fairly well.

Ah, OK. Yeah if you have time that would be awesome.
Is this where I tell you that I’m on Manjaro linux? :stuck_out_tongue: hah. Anyways, it’s not a huge concern. The fact that I was able to install duplicati through a package in the arch repo - that’s huge. It’s a nicety, not a critical thing.

Very happy thus far, for my laptops anyways it almost seems best for Backblaze over the internet but the home machines to my NAS - and that doesn’t need a trigger as such.

Let me know if you have further insight on linux specific - I thought about rolling a Manjaro built laptop so tat would be wicked to get going with a usb key input too down the road. However, thanks for the information ten fold.

Oops - got my topics mixed up. :blush:

I can provide a basic Linux shell script but for mount detection we’ll probably have to grab somebody like @Pectojin.

Does the drive have a static mount point? If so it might be as simple as “if /mnt/USB/Duplicating UPS/ folder found return 0 else return 3” (or something like that).

Alright that would be cool to get going anyway.

What does duplicati use for it’s back end for backups? I know a lot of these backup utilities use rsync, etc for the backup mechanism, quick google didn’t come up with much. Quite enjoying my experience thus far with it - thanks muchly.

If you haven’t ready it yet, you may find the How the backup process works • Duplicati page useful but a quick summary is that Duplicati just uses normal GET, PUT, LIST, and DELETE features of the destination.

It basically assumes a “dumb” backend and handles everything on the Duplicati executing side. This makes it easy to support many different types of backends since the GET/PUT/LIST/DELETE support bar is pretty low. :slight_smile:

I have read the document briefly trying to skim through to find what I was looking for - but that’s awesome. With so many different options there definitely is a learning curve to a lot of them but Duplicati makes it pretty brain dead simple.

On my windows machine - I get these errors. Any thoughts?

Nov 27, 2018 9:59 AM: Request for http://localhost:8200/api/v1/backup/40873d6b-e67c-4e0f-ad41-0aaa1013fe8d/log?pagesize=100 gave error
Nov 27, 2018 9:59 AM: Reporting error gave error
Nov 27, 2018 9:57 AM: Failed while executing “List” with id: 40873d6b-e67c-4e0f-ad41-0aaa1013fe8d
Nov 27, 2018 9:57 AM: Request for http://localhost:8200/api/v1/backup/40873d6b-e67c-4e0f-ad41-0aaa1013fe8d/filesets gave error
Duplicati.Library.Interface.UserInformationException: No filesets found on remote target
at Duplicati.Library.Main.Operation.ListFilesHandler.Run(IEnumerable1 filterstrings, IFilter compositefilter) at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action1 method)
at Duplicati.Library.Main.Controller.List(IEnumerable`1 filterstrings, IFilter filter)
at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
at Duplicati.Server.WebServer.RESTMethods.Backup.ListFileSets(IBackup backup, RequestInfo info)
at Duplicati.Server.WebServer.RESTHandler.DoProcess(RequestInfo info, String method, String module, String key)
Nov 27, 2018 9:57 AM: Reporting error gave error
System.ObjectDisposedException: Cannot write to a closed TextWriter.
at System.IO.__Error.WriterClosed()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at Duplicati.Server.WebServer.RESTHandler.DoProcess(RequestInfo info, String method, String module, String key)

I fixed my issue. There was another folder in my destination for the backup. It was “F:\backup” but it changed to “f:\ something” not sure. Maybe I hit some buttons by mistake - backup worked.

Just to clarify, you mean your Windows backup worked and you’re still working (waiting) on a “run when USB drive found” solution for Manjaro, right?

Yep, sure am. I installed on both machines and was able to fix my Windows error.

So I followed guides and online help but Duplicati refuses I guess to run as a service via root. When launching the duplicati instance I do not have access to /home/tech as an option to backup.

I have attempted to run the service as root:
sudo systemctl start duplicati

systemctl enable duplicati.service

it creates a sym link from what I recall and all. I can navigate to local host as well - it honestly just doesn’t see my home folder (sees it but it has a padlock and says it doesn’t have permission).

I installed it with the arch repo - that went fine from what I can tell as well. I didn’t install the beta as that was a lower revision number as well.

So did all this get handled by our Installing Duplicati on Linux (Arch / Manjaro) item?

If not (or if you’re just looking for a USB solution) maybe we should change the topic title or open a new one.

Hey @JonMikelV, I didn’t pursue this any further as it isn’t a built in feature to Duplicati and I haven’t explored this matter further. However, I feel that it is a project I wouldn’t mind tackling with a bit of time help from the community.

Title change and input from the community and we might just make this a feature request? Thoughts? I understand it might not be a priority but hey something might come of it. Feel free to change the title accordingly.

Before we fully push it out there, I’m curious how you see it working.

Let’s assume we’ve figured out how to detect the USB drive has been inserted - then what?

Does a backup automatically start? If so, how do you see that bring configured in the GUI?

Assuming there’s a “run when destination detected” option in the GUI and that starts the backup, what happens next? If the drive is never removed & re-inserted no more backups will run unless there’s also a schedule.

So should we still require a schedule and if the drive isn’t mounted at the scheduled time reschedule for a minute later (meaning queued after next backup if another job was already scheduled then)?

Normally a warning is thrown / backup fails if destination isn’t available - I assume that would have to be suppressed with my above process. How much risk does that add in the sense of no backups for as long as a drive is NOT inserted?

Note that I’m not trying to discourage, just hoping to have a design that makes sense before time is spent coding. :slight_smile:

Thanks for the reply and you totally raise some good points for sure. I definitely see the difficulty with that for sure with the technicalities. What IF, there were a way to detect when the USB device was plugged in and prompt for a backup job? One-time kind of idea? Almost like hey I noticed that you plugged in a usb device, can we help backup your system this one time? Perhaps it gets messy.

I just thought that there might be validity to helping users backup their system to a usb device if let’s say their other backups are working but they want be extra sure on this day etc.

If you have an idea, the feature request @JonMikelV pointed to earlier would be a good place to discuss. Someone there already uses a Windows event to start the backup when a drive is plugged in, however the perfect solution would be cross-platform, and some web search makes me think this might be OS-specific… Windows methods might use WMI. Linux/mono can’t do WMI, but they might have udev, dbus, and systemd.

Even if nobody can get together enough desire/energy/skill to lay code, a forum How-To is always possible.

It’s a fine idea, but there are lots of ideas in the queue waiting for resources fully consumed on other things. New features often get developed because someone with motivation and skill steps up and gets thing going. That usually causes much excitement, discussion, and suggestions for the person who volunteered to work.

Yeah I am on a Linux box for my main rig at home so the Windows idea works for my work system sure. I totally get that for sure with the amount of resources. I have a persistent issue with the updates/install, I’ll post it later today.