Use Rclone

Rclone is a command-line program to manage and sync your files on cloud storage.

ūüďė

Latest documentation

We provide this page to inform you that NetStorage supports Rclone. The latest documentation and usage guides are available at https://rclone.org/netstorage/.

NetStorage with Rclone

Using Rclone with NetStorage requires enabling the NetStorage Usage API.

Rclone connects to remote networks using the remote: command. It connects to NetStorage with or without a CP code:

  • With a CP code. [your-domain-prefix]-nsu.akamaihd.net/123456/subdirectory/
  • Without a CP code. [your-domain-prefix]-nsu.akamaihd.net

Features

Symlink Support

The Netstorage backend changes the rclone --links, -l behavior.

When uploading, instead of creating the .rclonelink file, use the symlink API in order to create the corresponding symlink on the remote. The .rclonelink file will not be created, the upload will be intercepted and only the symlink file that matches the source file name with no suffix will be created on the remote.

This will effectively allow commands like copy/copyto, move/moveto and sync to upload from local to remote and download from remote to local directories with symlinks. Due to internal rclone limitations, it is not possible to upload an individual symlink file to any remote backend. You can always use the "backend symlink" command to create a symlink on the NetStorage server, refer to "symlink" section below.

Individual symlink files on the remote can be used with the commands like cat to print the destination name, or delete to delete symlink, or copy, copy/to and move/moveto to download from the remote to local.

ūüďė

Individual symlinks

Specify symlink files on the remote .rclonelink suffix.

ūüöß

Don't use the suffix .rclonelink

No file with the .rclonelink suffix should exist on the server. It's not possible to upload or create a file with the .rclonelink suffix using rclone. It can only exist if it's manually created through a non-rclone method on the remote.

Implicit vs. Explicit Directories

With NetStorage, directories can exist in one of two forms:

  • Explicit Directory. This is an actual, physical directory that you have created in a storage group.
  • Implicit Directory. This refers to a directory within a path that has not been physically created. For example, during upload of a file, nonexistent subdirectories can be specified in the target path. NetStorage creates these as "implicit." While the directories aren't physically created, they exist implicitly and the noted path is connected with the uploaded file.

Rclone will intercept all file uploads and mkdir commands for the NetStorage remote and will explicitly issue the mkdir command for each directory in the uploading path. This will help with the interoperability with the other Akamai services such as SFTP and the Content Management Shell (CMShell). Rclone will not guarantee correctness of operations with implicit directories which might have been created as a result of using an upload API directly.