<commit_before># Purpose

This alternc plugin propose to backup all accounts data on borgbackup storage.
Each day a backup is done. User from panel can get a read access on previous backup, from backup directory on their root workspace.

# Requirement

You need :
* debian server (from wheezy to Stretch)
* alternc >= 3.2
* borbackup-bin ou borgbackup package
 * with wheezy : [from webelys backport](https://bintray.com/webelys/debian)
 * with jessie : [from backport](https://packages.debian.org/jessie-backports/borgbackup)
 * with stretch : [from stable](https://packages.debian.org/stretch/borgbackup)
* [apt-transport-https](https://packages.debian.org/search?keywords=apt-transport-https) package to use https bintray service.


# Installation

## Stable package

You can download last package from :
* github : [release page](../../releases/latest)
* bintray : [ ![Bintray](https://api.bintray.com/packages/alternc/stable/alternc-borgbackup/images/download.svg) ](https://bintray.com/alternc/stable/alternc-borgbackup/_latestVersion)
* from bintray repository

### With Wheezy

```shell
apt-get install apt-transport-https
echo "deb [trusted=yes] https://dl.bintray.com/webelys/debian wheezy main"  >> /etc/apt/sources.list.d/webelys.list
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install borgbackup-bin alternc-borgbackup
```
### With Jessie

```shell
apt-get install apt-transport-https
echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install -t jessie-backports borgbackup
apt-get install alternc-borgbackup
```

### With Stretch

```shell
apt-get install apt-transport-https
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install alternc-borgbackup
```

## Nightly package

You can get last package from bintray, it's follow git master branch

Following your distribution, you must first enable borgbackup repository.

```shell
echo "deb [trusted=yes] https://dl.bintray.com/alternc/nightly stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get upgrade
apt-get install alternc-borgbackup
```

# Configuration

Once alternc-borgbackup installed , you can update :
* configuration variable from panel 
 * go to https://alternc_panel//adm_variables.php
 * update borgbackup values (borgbackup_backup_dir_local, borgbackup_backup_path, borgbackup_bin)
 * apply change

# Packaging from source

To generate package we use [fpm tool](https://github.com/jordansissel/fpm)

```shell
apt-get install ruby ruby-dev rubygems build-essential
gem install --no-ri --no-rdoc fpm

git clone https://github.com/AlternC/alternc-borgbackup
cd alternc-borgbackup
make

```


# ROADMAP

* [ ] <commit_msg>Release 1.1.0 : use borgbackup package<commit_after># Purpose

This alternc plugin propose to backup all accounts data on borgbackup storage.
Each day a backup is done. User from panel can get a read access on previous backup, from backup directory on their root workspace.

# Requirement

You need :
* debian server (from wheezy to Stretch)
* alternc >= 3.2
* borbackup-bin ou borgbackup package
 * with wheezy : [from webelys backport](https://bintray.com/webelys/debian)
 * with jessie : [from backport](https://packages.debian.org/jessie-backports/borgbackup)
 * with stretch : [from stable](https://packages.debian.org/stretch/borgbackup)
* [apt-transport-https](https://packages.debian.org/search?keywords=apt-transport-https) package to use https bintray service.


# Installation

## Stable package

You can download last package from :
* github : [release page](../../releases/latest)
* bintray : [ ![Bintray](https://api.bintray.com/packages/alternc/stable/alternc-borgbackup/images/download.svg) ](https://bintray.com/alternc/stable/alternc-borgbackup/_latestVersion)
* from bintray repository

### With Wheezy

```shell
apt-get install apt-transport-https
echo "deb [trusted=yes] https://dl.bintray.com/webelys/debian wheezy main"  >> /etc/apt/sources.list.d/webelys.list
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install borgbackup-bin alternc-borgbackup
```
### With Jessie

```shell
apt-get install apt-transport-https
echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install -t jessie-backports borgbackup
apt-get install alternc-borgbackup
```

### With Stretch

```shell
apt-get install apt-transport-https
echo "deb [trusted=yes] https://dl.bintray.com/alternc/stable stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get install alternc-borgbackup
```

## Nightly package

You can get last package from bintray, it's follow git master branch

Following your distribution, you must first enable borgbackup repository.

```shell
echo "deb [trusted=yes] https://dl.bintray.com/alternc/nightly stable main"  >> /etc/apt/sources.list.d/alternc.list
apt-get update
apt-get upgrade
apt-get install alternc-borgbackup
```

# Configuration

Once alternc-borgbackup installed , you can update :
* configuration variable from panel 
 * go to https://alternc_panel//adm_variables.php
 * update borgbackup values (borgbackup_backup_dir_local, borgbackup_backup_path, borgbackup_bin)
 * apply change

# Packaging from source

To generate package we use [fpm tool](https://github.com/jordansissel/fpm)

```shell
apt-get install ruby ruby-dev rubygems build-essential
gem install --no-ri --no-rdoc fpm

git clone https://github.com/AlternC/alternc-borgbackup
cd alternc-borgbackup
make

```


# ROADMAP

* [ x ] Use borgbackup package in any case (1.1.0)
{'fraction_non_alphanumeric': 0.12299288197318325, 'fraction_numerical': 0.0016553550736633008, 'mean_word_length': 4.62046511627907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 28, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6086456', 'n_tokens_mistral': 2029, 'n_tokens_neox': 1937, 'n_words': 518}