mount GDrive

rclone

download

1
curl https://rclone.org/install.sh | sudo bash

configure

1
rclone config

follow the prompt

if no browser in remote machine

1
2
3
4
5
Use auto config?
y) Yes
n) No

y/n> n

manual

choose the binary file that match your OS

1
https://rclone.org/downloads/

unzip and mount to env

1
2
3
4
cp rclone /usr/bin/rclone.new
chmod 755 /usr/bin/rclone.new
chown root:root /usr/bin/rclone.new
mv /usr/bin/rclone.new /usr/bin/rclone

mount

1
nohup rclone mount 'remote':/remoteLoc /mnt/GoogleDrive --allow-other &> mnt_gd.out&

if there's an exception about fuse

1
apt install fuse

the mount process need to be hang on at backgrount!

deamon file

refer

bug

好像是个bug

在copy文件到OneDrive时会报错

1
2
2021/11/24 13:23:29 ERROR : : error listing: directory not found
2021/11/24 13:23:29 Failed to ls with 2 errors: last error was: directory not found

需要执行一遍

1
rclone ls OneDrive:

然后再执行copy指令才可以

OD Backup script

NextCloud

1
sudo /home/edlison/Applications/rclone/rclone copy /home/edlison/Applications/nextcloud OneDrive:/Cloud

Vaultwarden

1
sudo /home/edlison/Applications/rclone/rclone copy /home/edlison/Applications/vaultwarden OneDrive:/Vaultwarden

References

https://www.misterma.com/archives/900/

https://zhuanlan.zhihu.com/p/190224369

https://rclone.org