Getting Started

An overview of common IonFS operations, to help you get started. Before you begin, please make sure you have installed, created a metadata repo and configured ionfs.

Repositories

ionfs makes use of metadata repositories, or repos, to track data that has been secured by Ionburst Cloud. Metadata repos are specified in the configuration file stored under ~/.ionfs/appsettings.json.

To list available repos, the following ionfs command can be used:

ionfs repos

An example output would look like:

[example@ionfs-examples ~]$ ionfs repos
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Available Repositories (*default):
* ion://s3-example-ionfs/ (Ionburst.Apps.IonFS.MetadataS3)

Policies

Data can be secured by Ionburst Cloud according to available security policies. ionfs can be used to view the policies currently available to an Ionburst Cloud party.

To list available policies, the following can be used:

ionfs policy

An example output would look like:

[example@ionfs-examples ~]$ ionfs policy
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Available Classifications:
2:Restricted

File Operations

ionfs provides a set of tools to manage data stored by Ionburst Cloud as if it were a remote filesystem.

Directories

Data secured by Ionburst Cloud through ionfs can partition its repo in a directory structure.

List directories

To list available directories within a repo, the following can be used:

ionfs list

An example output would look like:

[example@ionfs-examples ~]$ ionfs list
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/
d example/

By default, this will list the contents of the repo's root directory. To specify a directory to list, the following can be used:

ionfs list ion://example

An example output would look like:

[example@ionfs-examples ~]$ ionfs list ion://example
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/example/
Remote directory is empty

Create a directory

To create a new directory within a repo, the following can be used:

ionfs mkdir ion://new-directory

An example output would look like:

[example@ionfs-examples ~]$ ionfs mkdir ion://new-directory
[example@ionfs-examples ~]$ ionfs list
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/
d example/
d new-directory/

Delete a directory

To remove a directory within a repo, the following can be used:

ionfs rmdir ion://new-directory

An example output would look like:

[example@ionfs-examples ~]$ ionfs mkdir ion://new-directory
[example@ionfs-examples ~]$ ionfs list
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/
d example/
d new-directory/

Files

The most important part of using ionfs - managing the data stored in Ionburst Cloud.

Put

To upload a file to Ionburst Cloud with ionfs, the following can be used:

ionfs put my-file ion://

An example output would look like:

[example@ionfs-examples ~]$ ionfs put my-file ion://
[example@ionfs-examples ~]$ ionfs list
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/
d example/
my-file 4/23/2021 1:49:51 PM

To upload data to a specific directory within your repo, use the following:

ionfs put my-file ion://example

An example output would look like:

[example@ionfs-examples ~]$ ionfs put my-file ion://example
[example@ionfs-examples ~]$ ionfs list ion://example
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/example/
example/my-file 4/23/2021 1:50:23 PM

Get

To retrieve a file with ionfs, use the following:

ionfs get ion://example/my-file

An example output would look like:

[example@ionfs-examples ~]$ rm my-file
[example@ionfs-examples ~]$ ionfs get ion://example/my-file
[example@ionfs-examples ~]$ ls
my-file
[example@ionfs-examples ~]$ cat my-file
Hello world, I'm a file about to be stored in Ionburst Cloud!

By default, this will download the file from Ionburst Cloud to the current directory, with the name used in ionfs. To download to a specific local directory, or to download to a different name, use the following:

ionfs get -n my-downloaded-file ion://example/my-file

An example output would look like:

[example@ionfs-examples ~]$ ionfs get -n my-file-new-name ion://example/my-file
[example@ionfs-examples ~]$ ls
my-file my-file-new-name
[example@ionfs-examples ~]$ cat my-file-new-name
Hello world, I'm a file about to be stored in Ionburst Cloud!

Delete

To delete a file from the ionfs repo and from Ionburst Cloud, the following can be used:

ionfs del ion://example/my-file

An example output would look like:

[example@ionfs-examples ~]$ ionfs del ion://example/my-file
[example@ionfs-examples ~]$ ionfs list ion://example
____ ___________
/ _/___ ____ / ____/ ___/
/ // __ \/ __ \/ /_ \__ \
_/ // /_/ / / / / __/ ___/ /
/___/\____/_/ /_/_/ /____/
Directory of ion://s3-example-ionfs/example/
Remote directory is empty