Using the insync-portable package

The insync-portable package available from our downloads page is just a compressed archive. After downloading it, extract the package using the following command:

$ tar -xf name-of-insync-portable-package.tar.bz2

This will create a folder named insync-portable in the current folder that contains the insync-portable app. You can then cd to it to run insync-portable.

$ cd insync-portable
$ ./insync-portable help
insync-portable - command line interface for the Insync process

available commands

 accept_all_new_shares
 accept_share
 add_account
 force_sync
 get_account_information
 get_actions_required
 get_domain_link
 get_errors
 get_file_status
 get_link
 get_new_shares
 get_proxy
 get_recent_changes
 get_root_drive_files
 get_status
 get_sync_progress
 manage_ignore_list
 manage_selective_sync
 move_folder
 open_in_gdrive
 pause_syncing
 quit
 reject_all_new_shares
 reject_share
 remove_account
 remove_from_insync
 resume_syncing
 retry_errors
 set_export_option
 set_proxy
 set_selective_sync
 share
 start

Run insync-portable help <command> for help with a specific command

The insync-portable command can only be called from the folder where the insync-portable package is extracted to. To call the command from any location, create the file /usr/bin/insync-portable with the following contents:

$ cat /usr/bin/insync-portable
#!/bin/bash
cd /path/to/client/folder/under/extracted/insync-portable/folder
LC_TIME=C exec ./insync-portable "$@"

Make sure that /usr/bin/portable has execute permissions for all users by running sudo chmod +x /usr/bin/insync-portable.


Below is a brief guide for using the insync-portable client. The commands also apply to insync-headless:

You can start Insync with insync-portable start. You can pass options to Insync when starting it. You can see these options when running insync-portable 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-portable add_account command. The options to the add_account command can be seen by running insync-portable 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-portable <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-portable help and you can get help for a specific command by running insync-portable <command> -h.

2 Likes