Docker-based encapsulation of the HubicFuse project, allowing you to mount OVH's hubiC as a network share.
git clone https://github.com/gotget/ggcom-docker-hubic.git
cd ggcom-docker-hubic
sudo docker build -t gotget/hubic .
sudo docker pull gotget/hubic
Step 1: Obtain a Client ID and reciprocal Secret Key from hubiC:
Step 2: Obtain a hubiC access token:
sudo docker rm -f hubic
sudo docker run \
--rm \
--interactive --tty \
--name=hubic-init \
--entrypoint=/usr/local/bin/hubic_token \
gotget/hubic
Follow the on-screen instructions, and stick with the defaults in parenthesis if you don't need to change them for a special need. When finished answering questions, the output will comprise the bulk of your hubiC credentials file that you should save with read-only access by your specific user (probably root) that you're running the Docker as:
hubicfuse.ini
client_id=api_hubic_ABC123789XYZ
client_secret=ABC123789XYZ
refresh_token=ABC123789XYZ
redirect_uri=https://SERVERNAME.example.com/
verify_ssl=True
sudo docker run \
--rm \
--interactive --tty \
--privileged \
--name=hubic \
-v /path/to/hubicfuse.ini:/root/.hubicfuse \
gotget/hubic
If everything works properly, you should see something along the lines of:
hubiC has been successfully mounted to /root/hubic/
You are now inside of the hubiC container with your mounted volumes from your host.
(list of directories and files stored on your hubiC will appear here)
root@abc123789xyz:~#
If a failure occurs, then ideally, you'll receive a specific message indicating what went wrong.
sudo docker run \
--detach \
--interactive --tty \
--privileged \
--name=hubic \
-v /path/to/hubicfuse.ini:/root/.hubicfuse \
-v /media/drive1/:/mnt/drive1/ \
-v /media/drive2/:/mnt/drive2/ \
-v /media/drive3/:/mnt/drive3/ \
gotget/hubic
3 simple steps:
docker-hubic.conf to /etc/init/docker-hubic.conf/usr/bin/env service docker-hubic restartYou can monitor the output of this service's status at /var/log/upstart/docker-hubic.log
Enter the hubiC container that's detached and running in the background:
sudo docker exec -it hubic bash
Gather a directory's contents together in an uncompressed file:
cd /mnt/drive3/
tar -cvf largeDirectory.tar ./largeDirectory/
Split the archive into segments (hubiC seems to choke on anything greater than (or equal to?) a Gigabyte, so we'll split the file into a sequence of files that each measure 950 MegaBytes, sans the last file of the sequence which may be smaller)
split \
--bytes=950M \
largeDirectory.tar \
largeDirectory.tar.
(Notice the ending .? This is what separates the name from the sequence that's named as an alphabetical suffix, which would save as: largeDirectory.tar.aa, largeDirectory.tar.ab, largeDirectory.tar.ac, etc.)
Move split-sequence files to a holding directory:
mkdir -pv /mnt/drive3/tmp/
mv -iv largeDirectory.tar.* /mnt/drive3/tmp/
Synchronizing with hubiC: (You can reverse paths if you want to synchronize from hubiC to your host volume)
hsync \
/mnt/drive3/tmp/ \
/hubic/largeDirectory-split/
hsync is an alias to rsync with a long list of options for hubiC compatibility, that was setup with this Docker container, and resides in ~/.bashrc inside of the Docker container.hcp is an alias to rsync with similar functionality to hsync but meant for non-destructive delivery to the destination (e.g. deleting files on the destination end, that aren't part of the source).cURL - command-line tool for transferring data using various protocols.Duply (simple duplicity) - a frontend that simplifies the use of Duplicity.
Duplicity, which provides an encrypted, digitally signed, versioned, remote backup of files requiring little of a remote server)EncFS - FUSE-based cryptographic filesystem.Nano - a text editor for Unix-like computing systems or operating environments using a command line interface.rsnapshot - a filesystem snapshot utility based on rsync (and similar to Duplicity, but with less built-in security, and geared more towards trusted environments).rsync - a widely-used utility to keep copies of a file on two (or more) computer systems.SSHFS - SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection.tree - a recursive directory listing program that produces a depth-indented listing of files./root/bin/, as it's set in the container's $PATH variable:
-v /path/to/utilities/:/root/bin/Thanks, and please enjoy. :-)
-Louis T. Getterman IV (@LTGIV) / GitHub / LinkedIn
Written with StackEdit.
Content type
Image
Digest
Size
203.6 MB
Last updated
about 10 years ago
docker pull gotget/hubic