Amazon Cloud Drive on FreeBSD

If you’re a FreeBSD fan just like me and you’d like to store data in the cloud, specifically in Amazon’s Cloud Drive from FreeBSD then you’ve come to the right place because today I’m going to show you how you can do that.

In order to achieve our goal we’re going to use an open source Python script called acd_cli. Therefore, just as you’ve imagined we’re going to start with installing acd_cli, but before hand we must insure that the server environment meets all requirements for using acd_cli.

First and foremost we’ll install Python3 using the following command:

pkg install python3

This will install Python 3.5 for us, but won’t import the SQLite extension for it so we’re going to build it from ports as follows (source):

  • Change the directory to /usr/ports/databases/py-sqlite3/
  • Edit the Makefile file and add the following definition to it on a separate line: PYTHON_VERSION=python3.5
  • Run the following command to build and install the extension: make install

Now, because Python does not enable pip by default we’ll have to make sure it’s enabled as we’re going to use pip in order to install and upgrade (by case) acd_cli and we do that with the following command:

python3 -m ensurepip

Also to insure that pip is up to date we might just as well run:

pip3 install –upgrade pip

Once we got that sorted out we must insure we have Git installed too as we cannot clone the repo without Git so we just install it using the package manager:

pkg install git

Once we have Git ready we’ll jump into installing the acd_cli using the following command:

pip3 install –upgrade git+https://github.com/yadayada/acd_cli.git

If everything goes well we should have acd_cli installed and running so we’re going to trigger the Amazon authentication by simply running:

acd_cli -v init

Doing so would initiate the authentication with Amazon’s OAuth system and moving forward all you have to do is to follow the authorization instructions from the original docs.

The full usage parameters of acd_cli can be found on this page on the official manpage.

(image source)

Post A Comment

Your email address will not be published. Required fields are marked *