<commit_before># simpledb-bkrs
##SimpleDB backup and restore

Console program to backup and restore SimpleDB domains. With this program, you can:

* Clone a SimpleDB domain to another domain
* Export a SimpleDB domain into a CSV file
* Import a previously exported CSV file into a SimpleDB domain

## Usage

Running just the program without parameters will output the usage message:
```
java -jar simpledb-bkrs-1.0.0-jar-with-dependencies.jar
usage: java ...
 -d,--destination <domain>   the destination to backup to. Examples:
                             file:///home/van/backup.csv,
                             file:///c:/temp/backup.csv (Windows),
                             sdb:///backupdomain
 -s,--source <domain>        the source to backup from. Examples:
                             sdb:///mydomain, file:///home/van/backup.csv,
                             file:///c:/temp/backup.csv (Windows)

```

### Examples

#### Back up a domain
`java -tar simpledb-bkrs-1.0.0-jar-with-dependencies.jar -s sdb:///MyDomain -d sdb:///MyBackup`

#### Export domain to a CSV
```
java -tar simpledb-bkrs-1.0.0-jar-with-dependencies.jar -s sdb:///MyDomain -d file:///home/van/mydomain.csv
```<commit_msg>Documentation change: added building instructions<commit_after># simpledb-bkrs
##SimpleDB backup and restore

Console program to backup and restore SimpleDB domains. With this program, you can:

* Clone a SimpleDB domain to another domain
* Export a SimpleDB domain into a CSV file
* Import a previously exported CSV file into a SimpleDB domain

## Building

You will need:

* Java 1.8
* Maven (tested with 3.3.1)

```
mvn clean install
```

## Usage

Running just the program without parameters will output the usage message:
```
java -jar simpledb-bkrs-1.0.0-jar-with-dependencies.jar
usage: java ...
 -d,--destination <domain>   the destination to backup to. Examples:
                             file:///home/van/backup.csv,
                             file:///c:/temp/backup.csv (Windows),
                             sdb:///backupdomain
 -s,--source <domain>        the source to backup from. Examples:
                             sdb:///mydomain, file:///home/van/backup.csv,
                             file:///c:/temp/backup.csv (Windows)

```

### Examples

#### Back up a domain
`java -tar simpledb-bkrs-1.0.0-jar-with-dependencies.jar -s sdb:///MyDomain -d sdb:///MyBackup`

#### Export domain to a CSV
```
java -tar simpledb-bkrs-1.0.0-jar-with-dependencies.jar -s sdb:///MyDomain -d file:///home/van/mydomain.csv
```
{'fraction_non_alphanumeric': 0.13041765169424743, 'fraction_numerical': 0.009062253743104806, 'mean_word_length': 2.2719072164948453, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1282910', 'n_tokens_mistral': 794, 'n_tokens_neox': 746, 'n_words': 235}