You are not logged in.

#1 2021-11-07 18:23:45

archqt
Member
Registered: 2015-04-29
Posts: 180

google drive synchronisation [NOT Solved]

Hi,
i have a directory mounted with rclone on a google-drive.
I use rclone to synchronize my local directory to google-drive but it takes 40mns every time. So it works well but it is very long, and it tests all the files.

What i want is something like "nextcloud", every time i change a file on my local storage, then it synchronizes this only file.

Is there something that can synchronize every time i change a file, and just this one.

Thanks

Last edited by archqt (2021-11-08 06:58:19)

Offline

#2 2021-11-08 12:53:27

Morta
Member
Registered: 2019-07-07
Posts: 655

Re: google drive synchronisation [NOT Solved]

You have to go in rclone forum. So there are a few option to change. Can you post your systemd file and rclone mount command maybe I‘m able to help.

Offline

#3 2021-11-08 15:20:12

archqt
Member
Registered: 2015-04-29
Posts: 180

Re: google drive synchronisation [NOT Solved]

Morta wrote:

You have to go in rclone forum. So there are a few option to change. Can you post your systemd file and rclone mount command maybe I‘m able to help.

Sure but i did not find it. So to mount the google drive i do this

rclone mount MyGoogleDrive: /home/user/LocalDrive 

I started it with the kde (plasma) services not with systemd

To syncrhonise i do this, and it takes 40mns

rclone sync --modify-window 5s --transfers 10 --fast-list --progress --checkers 100 /home/user/Doc/ LocalDrive/Doc/

Thanks

Offline

#4 2021-11-10 15:44:07

Morta
Member
Registered: 2019-07-07
Posts: 655

Re: google drive synchronisation [NOT Solved]

archqt wrote:
Morta wrote:

You have to go in rclone forum. So there are a few option to change. Can you post your systemd file and rclone mount command maybe I‘m able to help.

Sure but i did not find it. So to mount the google drive i do this

rclone mount MyGoogleDrive: /home/user/LocalDrive 

I started it with the kde (plasma) services not with systemd

To syncrhonise i do this, and it takes 40mns

rclone sync --modify-window 5s --transfers 10 --fast-list --progress --checkers 100 /home/user/Doc/ LocalDrive/Doc/

Thanks

Sorry, How do you mean sync? On my mount it‘s sync more or less in live. When I add a file on google or copy a file on Gdrive mount I see the file instaly.
So why do you sync with a command?

Offline

#5 2021-11-10 15:52:47

Morta
Member
Registered: 2019-07-07
Posts: 655

Re: google drive synchronisation [NOT Solved]

[morta@laptop]$ cat /etc/systemd/system/rclone.service 

[Unit]
Description=rClone Google Drive 
Wants=network-online.target
After=network.target network-online.target mutli-user.target

[Service]
Type=simple
User=morta
ExecStartPre=/bin/sleep 30	
ExecStart=/usr/bin/rclone mount --allow-non-empty GDRIVE:  "/home/GDRIVE" --config "/home/morta/.config/rclone/rclone.conf" --max-read-ahead "200M" --dir-cache-time "5m" --acd-templink-threshold "0" --bwlimit "0" --checkers "32" --low-level-retries "1" --quiet --stats "0" --timeout "30s"

ExecStop=fusermount -uz /home/GDRIVE
Restart=on-abort

[Install]
WantedBy=multi-user.target
cat /home/morta/.config/rclone/rclone.conf 
[GDRIVE]
type = drive
client_id = "ID".apps.googleusercontent.com
client_secret = "secret"
scope = drive
token = {"access_token":"TOKEN","token_type":"Bearer","refresh_token":"TOKEN","expiry":"2021-11-10T17:05:40.435656404+01:00"}
team_drive = 

Last edited by Morta (2021-11-10 15:55:08)

Offline

#6 2021-11-11 13:51:34

archqt
Member
Registered: 2015-04-29
Posts: 180

Re: google drive synchronisation [NOT Solved]

Morta wrote:

[

Sorry, How do you mean sync? On my mount it‘s sync more or less in live. When I add a file on google or copy a file on Gdrive mount I see the file instaly.
So why do you sync with a command?

I mean the same thing as rsync. I have all my data on my local drive and i only use google drive to save my data.
So i work all the time on my local drive and i need to save only files that changed on my google drive. But rsync or rclone is very very slow on google-drive.

So i wanted that each time i save a file on my local drive, that it was automatically saved on my google-drive too.

Offline

#7 2021-11-11 14:06:20

Morta
Member
Registered: 2019-07-07
Posts: 655

Re: google drive synchronisation [NOT Solved]

archqt wrote:
Morta wrote:

[

Sorry, How do you mean sync? On my mount it‘s sync more or less in live. When I add a file on google or copy a file on Gdrive mount I see the file instaly.
So why do you sync with a command?

I mean the same thing as rsync. I have all my data on my local drive and i only use google drive to save my data.
So i work all the time on my local drive and i need to save only files that changed on my google drive. But rsync or rclone is very very slow on google-drive.

So i wanted that each time i save a file on my local drive, that it was automatically saved on my google-drive too.

Have you a btrfs filesystem? Then you can do a snapshot or with ext3/4 you can do the same with rsnapshot and then push to the drive.

Offline

#8 2021-11-11 19:58:42

archqt
Member
Registered: 2015-04-29
Posts: 180

Re: google drive synchronisation [NOT Solved]

Morta wrote:
[morta@laptop]$ cat /etc/systemd/system/rclone.service 

[Unit]
Description=rClone Google Drive 
Wants=network-online.target
After=network.target network-online.target mutli-user.target

[Service]
Type=simple
User=morta
ExecStartPre=/bin/sleep 30	
ExecStart=/usr/bin/rclone mount --allow-non-empty GDRIVE:  "/home/GDRIVE" --config "/home/morta/.config/rclone/rclone.conf" --max-read-ahead "200M" --dir-cache-time "5m" --acd-templink-threshold "0" --bwlimit "0" --checkers "32" --low-level-retries "1" --quiet --stats "0" --timeout "30s"

ExecStop=fusermount -uz /home/GDRIVE
Restart=on-abort

[Install]
WantedBy=multi-user.target
cat /home/morta/.config/rclone/rclone.conf 
[GDRIVE]
type = drive
client_id = "ID".apps.googleusercontent.com
client_secret = "secret"
scope = drive
token = {"access_token":"TOKEN","token_type":"Bearer","refresh_token":"TOKEN","expiry":"2021-11-10T17:05:40.435656404+01:00"}
team_drive = 

Thanks, it is better to start rclone like this

Offline

#9 2021-11-16 19:00:07

archqt
Member
Registered: 2015-04-29
Posts: 180

Re: google drive synchronisation [NOT Solved]

Morta wrote:

Have you a btrfs filesystem? Then you can do a snapshot or with ext3/4 you can do the same with rsnapshot and then push to the drive.

Nope ext4, thanks for the reply

Offline

Board footer

Powered by FluxBB