Linux Terminal Sync Client

luckycloud Client for Servers Without a Graphical User Interface

Installation

• Open Terminal

[Placeholder: Linux Terminal]

• Install the Sync Client without a graphical user interface

[Placeholder: Linux Terminal]

Basic Usage

Initialize and start the Sync Client:

[Placeholder: Linux Terminal]

Download and synchronize a directory from the server.

  • Determine the directory ID by browsing a directory on the server. The ID is part of the URL.
  • The format looks like this: f4962ce9-ba07-47b8-a83a-73dd96c2ebfd.

[Placeholder: Linux Terminal]

Note: If you do not specify the password parameter in the command, it will be prompted later, which is more secure. Example:

Example:

[Placeholder: Linux Terminal]

The above command creates a new folder with the same name as the directory under the specified folder.

You can also synchronize a directory with an existing folder on your local computer. The existing files in the local folder will then be merged with the files in the directory.

[Placeholder: Linux Terminal]

After executing the download or sync command, the local folder will automatically be synchronized with the directory.

Detailed Documentation

lcs-cli is the command line interface for the luckycloud Client.

Subcommands:

  • init: initializes the configuration directory
  • start: starts the ccnet and luckycloudDaemon
  • stop: stops ccnet and luckycloudDaemon
  • list: lists local directories
  • list-remote: lists remote directories
  • status: displays the synchronization status
  • download: downloads and synchronizes a directory from the luckycloud server
  • download-by-name: downloads and synchronizes a directory from the luckycloud server defined by name
  • sync: synchronizes a directory with an existing folder
  • desync: desynchronizes a directory from the luckycloud server
  • create: creates a directory
  • config: configure luckycloud Client

When you run lcs-cli -h, the above help will be displayed. For each subcommand, you can also use the -h option to get help, e.g., lcs-cli download -h.

The luckycloud Client stores all its configuration information in a configuration directory. The default directory is ~/.ccnet. All following commands accept the -c option.

init

This command initializes the configuration directory.

It also creates subdirectories luckyclouddata and luckycloud under the parent directory. luckyclouddata is used to store internal data, while luckycloud is used as the default location for downloaded directories.

[Placeholder: Linux Terminal]

A file named luckycloud.ini is created under ~/.ccnet to record the location of the luckyclouddata directory.

If you want to run multiple instances of the luckycloud Client on the same machine, you can specify different config-dir and parent-dir when initializing the different client instances.

Then the instances can run without affecting each other.

When starting the instances, simply specify the ccnet configuration directories with the -c option.

start

Starts the luckycloud Client.

This command starts lcs-daemon, the file synchronization engine for the luckycloud Client.

[Placeholder: Linux Terminal]

stop

Stops the luckycloud Client. [Placeholder: Linux Terminal]

Download/Download-by-Name

Download a directory from the luckycloud server and synchronize it.

A new folder with the same name as the directory is created under the parent folder.

The download-by-name command works similarly but saves you the trouble of finding the directory ID.

It only works if the directory name on the server is unique.

[Placeholder: Linux Terminal]

sync

Synchronizes a directory with an existing folder. The existing files in the local folder are merged with the files in the directory.

[Placeholder: Linux Terminal]

desync

Desynchronize a directory from the luckycloud server. After executing this command, the local folder will no longer be synchronized with the server.

[Placeholder: Linux Terminal]

create

Create a new directory on the server.

[Placeholder: Linux Terminal]

list

Lists information about synchronized directories.

The information includes the directory name, directory ID, and the local folder path for the directory.

[Placeholder: Linux Terminal]

list-remote

Lists information about accessible directories on the server.

The information includes directory names and IDs.

[Placeholder: Linux Terminal]

status

List the synchronization status of directories.

This returns the name, synchronization status, and progress information of all local directories.

[Placeholder: Linux Terminal]

Status Meaning
synchronized Local folder matches the remote directory.
committing Files in the local folder are being indexed.
initializing Retrieving synchronization information from the server.
downloading file list File list is being downloaded from the server. Progress is displayed.
downloading files Downloading files from the server. Progress is displayed.
uploading Uploading files to the server. Progress is displayed.
error Error message is displayed in the progress column.

Skip SSL Certificate Verification

If you want to use a self-signed certificate on the server, you should ask the Sync Client to skip the certificate verification.

[Placeholder: Linux Terminal]

Set Transfer Speed Limit

Set the upload speed limit to 1MB/s:

[Placeholder: Linux Terminal]

Set the download speed limit to 1MB/s:

[Placeholder: Linux Terminal]

Two-Factor Authentication

lcs-cli supports two-factor authentication.

If you want to use this feature, you should add the --tfa argument to all lcs-cli commands.

For example:

[Placeholder: Linux Terminal]

Authentication with Token

If your server uses SSO (Single Sign-on) for login, you cannot use a password for login via the CLI.

To enable the use of CLI in such cases, we offer an option to authenticate with an API token.

You should be able to obtain your API token from the profile page in the web interface. (You should use an 8.0.6 server for this.)

Use the "-T token" option instead of "-p password" to authenticate with the following commands:

[Placeholder: Linux Terminal]