Fork me on GitHub

Slick

Build your own backup

Welcome

Hey there! Welcome to Slick, and easy way to backup and share files. We are going to walk through creating and backing up a folder.


Installing

To install Slick, run the following in your terminal:

$ curl -o- \
https://raw.githubusercontent.com/slick-io/slick/master/install.sh | bash

Or, using wget

$ wget -qO- \
https://raw.githubusercontent.com/slick-io/slick/master/install.sh | bash

This script creates a directory at ~/.slick-install. On OSX, it will install gcc if it's not already available. On Ubuntu it will install the following packages if they are not already installed: git, build-essential, libtool, and autoconf.

You can customize the location Slick is installed to by setting SLICK_INSTALL_HOME to the desired directory.

As this is our first time using Slick, we need to initialize and tell it what server we are going to use for storage. We can do this by running:

$ slick init --url wss://zerocool.slick.io
  Client initialized at ~/.slick

Great! So now let's make our first volume.

Creating a volume & adding files

We are going to walk through creating a volume and adding some files to it. Later, we will go through these commands in details to see what's going on under the hood.

A volume is a root folder in which you can put other files or folders. Sharing is controlled on a per-volume basis.

To create our first volume, let's run,

$ slick volumes create backup
  Created volume backup

Now we've created our new volume, so let's add some files to it. In our example, let's add all the jpegs to backup.

$ ls
  another.jpg
  image.jpg
$ slick add backup:/ *.jpg
  [============] image.jpg
  [============] another.jpg

There are a couple of things going on here. backup: specified the volume, and / is the path it will add these files to. Add will never overwrite. Now let's take a look at the files we've just added.

$ slick ls backup:/
  another.jpg
  image.jpg

Great! We can now open or fetch those files.

$ slick fetch backup:/another.jpg copy-of-another.jpg
  [=============] another.jpg
$ ls
  another.jpg
  copy-of-another.jpg
  image.jpg
$ slick open backup:/image.jpg
  

Say later we want to update our backup because we've made changes. Let's do that now.

$ slick add backup:/ *.jpg
  [=============] copy-of-another.jpg
$ slick ls backup:/
  another.jpg
  copy-of-another.jpg
  image.jpg

Explanation

Let's go back through our example and take a look at what is going on.

$ slick init --url wss://zerocool.slick.io

The init command creates a directory at ~/.slick and places a config file at ~/.slick/config.json. The server at zerocool.slick.io is responsible for storing your encrypted data, allowing other users to send you messages, and forwarding your messages to other users. This directory stores the root of our merkle dag. Digests for nodes in the tree are computed using blake2b and the leaf nodes in this tree are encrypted using libsodium's secretbox.

$ slick volumes create backup

The volumes create command causes the root of our tree to be updated. The new root contains a reference to our volume.

Now we've created our new volume, so let's add some files to it. In our example, let's add all the jpegs to backup.

$ slick add backup:/ *.jpg

This command will scan the currency directory for all files ending with *.jpg. Files over one megabyte will be divided up into one megabyte chunks. Each chunk is encrypted using a unique key for each file. Then, the key and digests which comprise the file are then added to the directory.

$ slick ls backup:/

This finds the root folder for volume backup and iterates through the index which holds on to it's entries.

$ slick fetch backup:/another.jpg copy-of-another.jpg

This command gets the file representation at /another.jpg, iterates through each digest and fetches each block. Those blocks are then decrypted and written to ./copy-of-another.jpg.

Commands

add

SYNOPSIS

slick add [destination] [source] <otherSources...> [-c | --conflict <rename,skip,replace>]

DESCRIPTION

Adds files to a destination.

Destination must be in the format of volume:/path. Globs are accepted for sources.

If a file exists with the same path a conflict resolution mode will be used. Rename will append a
unique extension of the format .number to the destination. Skip will by pass any files with the same name.
Replace will update in place the conflicting file. Adding is atomic, and no entries will be persisted until the command
completes.

OPTIONS

-c --conflict
Selects the conflict resolution mode, uses rename by default



cat

SYNOPSIS

slick cat [target]

DESCRIPTION

Prints the contents of a file to stdout.

Target must be in the format of volume:/path.



config

SYNOPSIS

slick config

DESCRIPTION

Prints out the current storage configuration.



cp

SYNOPSIS

slick cp <source> <destination>

DESCRIPTION

Copies a file from source to destination.

Source and destination must be in the format of volume:/path.



fetch

SYNOPSIS

slick fetch <source> <destination>

DESCRIPTION

Saves a file or directory to a target location.

Source must be in the format of volume:/path.



help

SYNOPSIS

slick help <cmd>

DESCRIPTION

Displays help for a command.



info

SYNOPSIS

slick info [target]

DESCRIPTION

Prints out detailed information about an entry.

Target must be in the format of volume:/path.



init

SYNOPSIS

slick init [-u | --url <serverUrl>] [-c | --config <path>] [-f | --force]

DESCRIPTION

Initializes a slick client.

OPTIONS

-u --url
The url to connect to.

-f --force
Force initialization.

-c --config
The path to a custom config file to use.



ls

SYNOPSIS

slick ls <file> [-l | --long] [-U]

DESCRIPTION

Lists a directory or file. Contents are listed in alphebetical order.

File must be in the format of volume:/path.

OPTIONS

-l --long
Long output, shows time, type and digest fragment
-U
Use creation time in long output mode



mkdir

SYNOPSIS

slick mkdir <target>

DESCRIPTION

Creates a new directory at specified target.

Target must be in the format of volume:/path.



mv

SYNOPSIS

slick mv <source> <destination>

DESCRIPTION

Moves a file from source to destination.

Source and destination must be in the format of volume:/path.



rm

SYNOPSIS

slick rm <target>

DESCRIPTION

Removes the target. This merely unlinks the entry from the folder it resides in and does not guarantee the
underlying blocks are deleted.

Target must be in the format of volume:/path.



server

SYNOPSIS

slick-server [-R | --root <path>]

DESCRIPTION

Starts the slick server which provides fuse, web and block storage services.

OPTIONS

-R --root
The root directory to read config.json from





volumes

SYNOPSIS

slick volumes [list]
slick volumes create <name>
slick volumes destroy <name>

DESCRIPTION

Used to manage volumes within slick.

Running slick volumes without a command will list the available volumes by default.
slick volumes create can be used to create a new volumes. slick volumes destroy will
destroy a volumes with the corresponding name. Names of volumes are restricted to
alphanumerics and the following characters _.,+=-]+".

DETAILS

Volume state is managed within your local slick root directory. The slick-volumes command
allows reading and writing operations to occur to the list of volumes. Volumes names must be unique
without your local slick instance. By default, all volumes have read-write permission by only you.

SEE ALSO