1. Home
  2. Knowledge Base
  3. Applications
  4. RClone
  5. How to Edit the RClone Move Script

The purpose of the move.sh script is to automatically move files from your server to your google drive account. This is done by default every night at 3:12 am controlled by a cron job.

Editing the Cron Job

  1. SSH into your server
  2. Enter in the following commands
sudo su -
crontab -e 

3. You will then see a line stating the following

12 3 * * * /home/{username}/rclone/move.sh

4. You can now change the timings for the cron job. 

For help with setting new cron rules use: https://crontab-generator.org/

In short: * Minutes – * Hours – * Days – * Months – * Weekdays

5. Once you are finished you can then just press control and X and then Y to save and edit.

Editing the Script

The move.sh script will be located in /home/USERNAME/rclone/move.sh

  1. SSH into your server
  2. Run the following command
sudo su -
cd /home/USERNAME/rclone/
chattr -i move.sh
nano move.sh

3. You will now be editing the file. The move.sh script flags will look like something below. (This is an un-encrypted example)

/usr/bin/rclone move /home/${username}/rclone/cache crypt: --drive-chunk-size 64M --delete-empty-src-dirs --user-agent user --fast-list --bwlimit 8M -P --log-file=/home/${username}/rclone/move.log -v

Here is a breakdown of the various command and flags that are used.

/usr/bin/rclone move > instruction rclone to move files.

Options for rclone to Google Drive: MOVE, SYNC & COPY
move – Will move from source and delete from source to Google Drive
sync – Will sync from source to Google Drive. Meaning if content is not present in source it will get deleted from Google Drive
copy – Will copy from source to Google Drive 1:1

/home/{username}/rclone/cache > path of source
gdrive: > name of remote (Google Drive)
--drive-chunk-size 64M > Upload chunk size. Must a power of 2 >= 256k. (default 8M)
--delete-empty-src-dirs > Delete empty source dirs after move
--user-agent user > Set the user-agent to a specified string. The default is rclone/ version (default “rclone/v1.51.0”) (was an issue with Google Drive once not being specified)
--fast-list > Use recursive list if available. Uses more memory but fewer transactions. (good for speed)
--bwlimit 8M > Bandwidth limit in kBytes/s, or use suffix b|k|M|G or a full timetable. (8M will allow for a continuous 24/7 upload without getting hit by the max 750GB/daily upload limit)
-P > Show progress during transfer. (Prints status in terminal while running)
--log-file=/home/${username}/rclone/move.log > Log everything to this file
-v > Print lots more stuff

More flags can be found at https://rclone.org/flags/

4. When you have edited everything that you need, you can save and exit this editor with ctrl+x press Y

5. Finally, to lock the script again, please enter the following command.

chattr +i move.sh

Was this article helpful?

Related Articles

Guidelines

Please add bugs found in QuickBox Pro using this template:

Bug Report
Select Bug Report as the issue template

Please add feature requests for application inclusion in QuickBox Pro using this template:

Application Feature Request
Select Application Feature Request as the issue template

Please add feature requests for general QuickBox Pro using this template:

Select General Feature Request as the issue template
Select General Feature Request as the issue template

Viewing issues as well as feature requests does not require an account.

You will need to create an account on our Lab in order to post both Issues as well as Feature Requests.
You can register an account here if you do not already have one.

We look forward to your reports as well as your ideas and suggestions for ongoing developments to the QuickBox Pro software!

The QuickBox Pro Community Appreciation Day Event Sale is in full effect.
Get your savings on!
00
Days
00
Hours
00
Minutes
00
Seconds