I’m just learning about rclyne (tried to read a lot) and I have some questions. I’m on a ubuntu server.
I have a google drive with 4TB files. Is there a way to encrypt the files without having to download/upload them again?
https://github.com/dweidenfeld/plexdrive/blob/master/TUTORIAL.md => This gives me reading rights with plexdrive. Will I need a different mount to upload the files to the google drive since plex drive cannot write? Or can I use the rclone mount that is setup with the howto?
Thank you everybody for helping a starter in linux!
You have to download and upload to encrypt it. One tip is to use Google Compute, they have a $300 free trial. Since its only 4TB you dont need to cap the speed and it should be done in 1-2 hours.
2: Yes you need something in addition to plexdrive for uploades. rclone copy, move or mount. For more advanced users you can also create a union fuse with a read-only plexdrive mount and a rclone mount for a seamless single mount.
Ok, I think i got it. But now I’m reading about EncFS and that it is faster. I’m currently at a VPS with 4vcores. What should I do? Use rclone with crypt or try my luck at EncFS?
I have to admit, at first glance EnCFS looks like it’s a lot more difficult?
EncFS is more flexible with more application support, but having the downside by being more complex to set up. Personally I’m using Rclone crypt for the simplicity.
Ok, ty. I have everthing set up but now I want to copy the downloaded files to google drive. I have a command like this “rclone copy /home/user/Plex GoogleDriveCrypt:/ --ignore-existing -v --exclude-from /usr/bin/exclude-file.txt” which works BUT I want it to run every 30min. I read in the forum that a script is the way to go. But I have to admit this is again something new for me. Can you advise? Do I need a script or can I put it like this in crontab?
You can do it either way but if you stick it directly in cron, one may execute and take longer than 30 minutes and a new one will execute and you will get multiple running at the same time.
If you want to keep it simple, you can run it out of cron but i’d suggest adding a timeout command to the command line so that it will be terminated before the next one starts as long as you are reasonably sure that each one is expected to take less than 30 minutes:
Alternatively, you could create a script taht would only run the command if it wasn’t previously running or something like that.
also, you really may want to add a logfile option so you know whats happening or capture standard out like this:
*/30 * * * * /usr/sbin/timeout 30m rclone copy /home/user/Plex GoogleDriveCrypt:/ --ignore-existing -v --exclude-from /usr/bin/exclude-file.txt > ~/rclone.log 2>&1
Is there a good reason why you are using ‘ignore-existing’? That tells rclone not even to look at those files and check if they are the same. If you catch a file in the middle of that file being written to, then you can copy half of the file to google drive and the next rclone run will simply ignore it and not check if it was actually complete. without that flag, it will look at the byte size and the time to have a better handle on if that file is complete.
Yeah I had some problems without the ignore existing but I’ll run it this night without it. I already added a config output :).
If I would like to write a small script, how should I start with this? I just want it to check for new files and if there are any files upload them with rclone trough crypt. It doesn’t even have to check for new files but just use copy I guess?
I would let rclone check for new files personally. It does a really good job at it and is pretty efficient.
All the script should really do (barring any other use cases) is check for a running rclone before executing and either terminate it, or exit silently (wait for the next 30 minute run out of cron). If I find some code snippets, i’ll add them.