/hubic-backup

hubic backup command line tool

Primary LanguageC++OtherNOASSERTION

hubic-backup

hubiC backup command line tool for linux & OSX

Features

  • Exclude files using wildcards
  • Aes 256bits encryption (openssl interop)
  • Upload only modified files
  • Logging support using excellent spdlog library
  • Multi threading support
  • Incremental backup

Limitations

Dependencies

Library Ubuntu package
libcurl libcurl4-openssl-dev
boost-system libboost-system-dev
boost-filesystem libboost-filesystem-dev
boost-regex libboost-regex-dev
boost-program-options libboost-program-options-dev
jsonxx n/a : embedded

Setup

Linux (Ubuntu)

Triple-click on lines to select them.

# Install build tools
sudo apt-get install git build-essential autoconf automake
# Clone this repository
git clone https://github.com/frachop/hubic-backup.git && cd hubic-backup/
# Install dependencies 
sudo apt-get install libboost-system-dev libcurl4-openssl-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libssl-dev
# Launch automake
aclocal && automake && autoconf
# Build sources
./configure && make all
# Use the binary file
cp -v src/hubic-backup /usr/local/bin/

Usage

Description

Usage: hubic-backup [OPTIONS]

general:
  -h [ --help ]                      this message
  -v [ --version ]                   display version infos
  --loglevel arg (=trace)            select the log level. ('trace', 'debug', 
                                     'info', 'notice', 'warning', 'error', 
                                     'critical', 'alert' or 'emerg')

auth:
  -l [ --login ] arg                 hubic login
  -p [ --pwd ] arg                   hubic password

source:
  -i [ --src ] arg                   source folder
  -x [ --excludes ] arg              optional exclude file list path
  --fingerprint-md5                  force local md5 computation to compare 
                                     with destination file. CPU expansive

destination:
  -c [ --container ] arg (=default)  destination hubic container
  -o [ --dst ] arg                   destination folder
  -k [ --crypt-password ] arg        optional crypto password
  -d [ --del-non-existing ]          allow deleting non existing backup files

Simple example

hubic-backup \
	--login <hubicLogin> \
	--pwd <hubicPassword> \
	--src /src/path/to/save/ \
	--dst hubic/backup/dir \
	--crypt-password @my8eau7ifulPa55w0rd!		

You can specify a particular container with --container {containerName} option.

You can specify a path to a file with excludes wildcards: --excludes /path/of/exclude/file.txt

Example of exclude file:

.*
tmp*
?tmpDir

To restore files, use any swift client or hubic browser interface. Then, if files are encrypted, use the command line: openssl enc -aes-256-cbc -d -in <source path> -out <destination path> -k <password> to decrypt it.