Can I use Insync on Linux terminal only?

Hi,

I’m running a VPS on remote server and wondering whether can I use the Google Drive as a replicator of the server.

Is it possible to run the Insync on terminal as demon like Dropbox?

Will be tagging our engineer @lpugoy and he will get back to you.

@Pat_Postman: The insync-headless package is appropriate for this case. You can get it at www.insynchq.com/downloads.

Below is a brief guide for using the headless client.

You can start Insync with insync-headless start. You can pass options to Insync when starting it. You can see these options when running insync-headless start -h. The most common one to use is probably the --no-daemon flag, which tells Insync to run in the terminal and not become a daemon. You can run this if you want to see if Insync raises errors, for example.

After starting Insync you have to add your account. You can do this with the insync-headless add_account command. The options to the add_account command can be seen by running insync-headless add_account -h. Briefly these options are the following:

-a AUTH_CODE, --auth-code AUTH_CODE - This is the code that authorizes Insync to access your account. You can get this when you go to the specified url (https://goo.gl/jv797S) and follow the prompts.

-p PATH, --path PATH - Where the Insync folder for the account will be placed. If not given it will default to ~/<email address>. You have to give the full path where you want to place the Insync folder. If the path already exists then Insync will perform “file compare” on the files in that folder with the files in your Drive account. This means that if there are files in that folder that also exist in Drive then Insync will not download them anymore. This is helpful when you already have a folder of your files from Drive and don’t want to redownload them.

-e {open-document,ms-office,link}, --export-option {open-document,ms-office,link} - This option sets what format Google documents will be downloaded as. “open-document” and “ms-office” downloads them as Libre Office (.odt) and MS Office (.docx), respectively, while “link” downloads them as links to the Google documents online. You might use this if you want to imitate the behavior of the official Drive client.

After adding your account Insync will then sync your files to the folder you specified. Below are some helpful commands to manage your account. You can get the options you can pass to them by running insync-headless <command> -h.

get_account_information
get_actions_required
get_errors
get_status

These commands are used to query the status of your account and of the Insync process. Use these if you suspect that some files were not synced, for example.

force_sync - This tells Insync to rescan the directory that is passed as an option to the command. This is useful for network drives when some file system events are not caught by Insync.

manage_selective_sync - This manages the selective sync settings for your account. You might use this if you only want to sync specific files from your Drive account. Please be aware that if you uncheck files from the selective sync interface Insync will delete these files from your folder.

manage_ignore_list - This manages the ignore list of your account. You can use the ignore list to prevent some files from syncing. The ignore list is only compared against the name of the file/folder, so entries like “folder/file” will not work.

You can get the full list of commands by running insync-headless help and you can get help for a specific command by running insync-headless <command> -h.

If you want to create a systemd service for Insync please check the post here: Headless install failing to restart on boot with data mounted on a smb share. The RequiresMountsFor option is probably not needed unless you are using a separate partition for your Insync folder.

1 Like

Great and thorough response. Woudl be good to move this info to official documentation for future reference though.

Hi,
I also need something similar. I need to access Shared Drives from a remote Linux machine, so, no GUI.

Is it possible to install Insync and configure it to sync my shared drives on a remote Linux machine - all from command line?

@Danijel Did Ipugoy’s guide on Insync-Headless (from 2016) not work for you?

Well, 2016 was 5 years ago. Is this guide still relevant? I wouldn’t like to waste time. Thanks!

OK, I installed the insync_3.3.7.40937-buster_amd64.deb package from command line.
I see only /usr/bin/insync and not insync-headless.
Where do I find insync-headless?

Hi @Danijel! Looks like you downloaded the GUI/desktop version-- here’s the Insync 3 headless: https://www.insynchq.com/downloads?mt=server