Home others how to sync your google drive folder to your linux pc and backup the drive
others

how to sync your google drive folder to your linux pc and backup the drive

sudo add-apt-repository ppa:alessandro-strada/ppa

sudo apt update && sudo apt install google-drive-ocamlfuse

google-drive-ocamlfuse

mkdir ~/googledrive

google-drive-ocamlfuse ~/googledrive

after you finished, disconnect the google drive

fusermount -u ~/google-drive

Now this is the real thing, how to backup your googledrive to your linux pc

  • I create a script to connect the google drive, sync it to my linux pc and disconnected it
google-drive-ocamlfuse ~/googledrive
cd googledrive
./dobackup
cd ..
./putusgoogle
  • first is mounting the googledrive to my googledrive folder using google-drive-ocamlfuse
  • go to googledrive folder and execute ./dobackup
  • below is dobackup script
rsync -arvz --exclude-from=/home/ronny/backupgdrive/exclude.txt --log-file=rsync-`date '+%Y%m%d_%H%M%S'`.log --no-perms --no-owner --no-group --delete --progress * ~/backupgdrive/backup/
  • dobackup script is sync the data from cloud to your PC’s
  • after finished, do disconnected the google drive using this ./putusgoogle script below
sudo fusermount -u ~/googledrive

Author

Ronny

Leave a Reply