I recently installed rclone on Windows and it was a bit of a bumpy road because I couldn't find any full tutorials.
Basically here is what I did:
-download rclone and unpack
-run .\rclone.exe config in Powershell
-configure the mounts interactively
-run .\rclone mount remotename: X: + some additional parameters optionally
(I hope it is helpful for somebody, because it was not very obvious to me)
i have a few questions about rclone on windows.
Do you agree in general with the above procedure?
I currently open one powershell window for every mount I want to open and then just leave the console open. Is there a better way of doing this?
If I start the GUI in another console I can browse it normally, but it doesn't show any stats. I assume it can not access the data of the other shells?
What would be a graceful way of unmonting? Currently I press Control+C
That is the basic gist of it yes. You don't need to use powershell specifically though. Regular cmd is fine if you prefer that.
Of course. The usual way to do it is to have a mounting script that runs on startup - set via Windows task scheduler. The even more robust way is to take that same script and run it as a system service completely in the background. This can better handle unexpected events and re-launch the mount if something went wrong ect. For this task I usually use NSSM (google it).
I can share a bunch of scripts for this sort of stuff on windows. Just specify for me what it is you are looking to create so I know what is relevant for you, and if I need to make any particular changes. I can generally assist with batch scripting if needed. (although I am far from a batch expert).
If you want the webGUI to be "attached" to a certain rclone process (such as a mount) you need to launch that instance of the web-GUI in the same command via --rc --rc-web-gui. If you want to use the webGUI on multiple mounts you can launch each one with a different port number, for example --rc-addr localhost:5573. If you end up using one of my scripts that will take care of this for you if you just specify the port in the settings (or I could make it callable via parameter for example if preferred, and needed a bunch of mounts generated programmatically).
That is the intended way on Windows. I think there was recently some alternative soft-kill implemented into WinFSP, but I'm not sure it has much benefit to it. Pulling the plug on the mount isn't really an issue on Windows and it won't break anything (aside from obviously canceling any in-progress transfers). I've never seen a bad dismount result in anything screwy and I've been pretty abusive in some of my experiments
This is something I'm interested in as well. I'm currently using a few different versions of this script which I found on Github. Currently I'm starting each script on a separate console window. I'm wondering if this can be done better, using nssm. And if there are "better" scripts.
Sure. Just say a bit about what you want to achieve.
If you want it to run all in the background (and also to start as soon as possible so it will be ready as soon as you log in) then a system service via NSSM is a great way to do it. It's pretty easy to set up too.
I have a fair bit of advanced scripts, but the mounting itself is fairly uncomplicated as it is mostly just a configuration file for the command. It's my various maintenance and uploading scripts that get fancy-shmancy. I did implement a system for precaching the drives though, which can be a really great performance benefit if you use a backend with supports polling and fast-list (like Google Drive which I mostly use).
The precaching script is actually it's own module, but it gets called from the mounting script if enabled.
A short primer on precaching if you want to learn more.
Once I hear back about if you have any particular needs or requests I will share something that I think fits the bill.
neither do I have any fancy usecases. I will probably have a few gdrive / crypt remotes.
I like the idea of starting automatically, while I also enjoy the possibility to influence the Process while being logged in. Let's say I want to change the drive letter – I assume this would be impossible with the automatic setup while it is already running?
No, it should be quite doable, but you probably have to send a stop-signal to NSSM for the service - then change the setting in the mountscript and restart the service. It's not hard at all, but I guess it's slightly less convenient than just CTRL+C, hitting the uparrow and chaging one letter on the line.
I'm doing a little cleanup on a simple mount-script template now so it is a bit more presentable for public consumption. A few small robustness things and some more appropriate commenting.
That definitely works well too.
I think NSSM has some benefits when it comes to robustness in supporting automatic re-launching in case of a crash and such, but those are really only minor details. Perhaps this is possible some way via task scheduler too, but I'm not aware of it (not that I'm an expert in using it).
I haven't really. Not due to not wanting to or because I've forgotten - but because a very serious medical emergency in the core family occurred recently. Things have gotten quite hectic and I've had my hands full with this.
With a little luck things may stabilize soon as the worst danger passes and I promise to get back on this. I hate leaving people hanging, but I have to prioritize my family when they need me obviously.
I gave my existing (working but not as user friendly) scripts to whiteloader if you are impatient and want to have a look. Otherwise, hang in there a few more days and I'll hopefully have just a little more spare time to do this. I've kinda been MIA from the forum the last 2 weeks... I will use the @menntion to notify you both when I update this post.