<commit_before>shell script for making a MISP backup

Installation
============

Modify config file:
````
cp misp-backup.conf.sample misp-backup.conf
#adjust values
vi misp-backup.conf
````

Running
=======

run the script:
````
sh misp-backup.sh
````

Open
====

````
    sample files
    server certificates for sync connections
    organisation logos (though this isn't as important, but it's still annoying to lose them)

````


Licence
=======

See LICENSE
initial idea based daverstephens on https://github.com/daverstephens/The-SOC-Shop<commit_msg>update: add information for misp-restore.sh script<commit_after>MISP-BACKUP
-----------

shell script for making a MISP backup

Installation
============

Modify config file:
````
cp misp-backup.conf.sample misp-backup.conf
#adjust values
vi misp-backup.conf
````

Running
=======

run the script:
````
sh misp-backup.sh
````

Open
====

````
    sample files
    server certificates for sync connections
    organisation logos (though this isn't as important, but it's still annoying to lose them)

````


Licence
=======

See LICENSE
initial idea based daverstephens on https://github.com/daverstephens/The-SOC-Shop


MISP-RESTORE
------------

This script aims at restoring a backup made with `misp-backup.sh` script found in this folder.

Pre-requisites
==============
- Apache, MISP and mariaDB/MySQL should be installed before running this script.
- The versions of MISP software backed up and restored should be the same.  (e.g. restore fiels database of a MISP v2.4.86 on a server with the same version of MISP)
- This script only restores the data on a database installed on localhost.

Description
===========
 This script restores following file/DB from an archive created with `misp-backup.sh`:
 - app/Config PHP files
 - app/webroot/img orgs and custom files
 - app/webroot/files 
 - GnuPG files
 - MYSQL User used in archive or its password if exists
 - MISP database
 


Run the script
==============

```
run ./misp-restore.sh  PATH_TO_ARCHIVE.tar.gz
```
{'fraction_non_alphanumeric': 0.1382716049382716, 'fraction_numerical': 0.0019753086419753087, 'mean_word_length': 3.812351543942993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4304258', 'n_tokens_mistral': 637, 'n_tokens_neox': 586, 'n_words': 226}