Skip to content
Snippets Groups Projects
Commit f72b02c0 authored by Neil Schark's avatar Neil Schark
Browse files

Merge branch 'develop' into export-import-sdn-config

parents aea8537c accc39a5
No related branches found
No related tags found
Loading
Pipeline #124487 passed
......@@ -59,3 +59,6 @@ applications/venv-manager/sdn_config.json
#debug
__debug_bin
#misc
*/mongo_backup_*.tar
variables:
GOSDN_IMAGE: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}"
GOSDN_TESTING_IMAGE: "${CI_REGISTRY_IMAGE}:testing_${CI_COMMIT_SHA}"
CEOS_IMAGE: "${CI_PCONTAINERS_REGISTRY_IMAGE}/ceos:4.28.2F"
CEOS_IMAGE: "${CI_PCONTAINERS_REGISTRY_IMAGE}/ceos:4.29.0.2F"
GOLANG_VERSION: "1.19"
workflow:
......
......@@ -19,6 +19,7 @@ to get all submodules.
- [Contributing](CONTRIBUTING.md)
- [License](LICENSE)
- [CI Status](#ci-status)
- [Development Tutorial](#development-tutorial)
# Overview
......@@ -122,3 +123,20 @@ Information about how to use the CLI is provided in the `cli` folder, see [here]
| ------ | ------ |
| [![coverage report](https://code.fbi.h-da.de/danet/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master) | [![coverage report](https://code.fbi.h-da.de/danet/gosdn/badges/develop/coverage.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/develop) |
| [![pipeline status](https://code.fbi.h-da.de/danet/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master) | [![pipeline status](https://code.fbi.h-da.de/danet/gosdn/badges/develop/pipeline.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/develop) |
# Development Tutorial
TBD
## Backup and restore your mongodb
If you are using the mongodb provided via the `docker-compose.yaml`, you can easily backup and restore your data via two scripts.
```bash
./scripts/backup_mongo_volume.sh $(suffix_of_backup)
```
```bash
./scripts/restore_mongo_volume.sh $(suffix_of_backup)
```
Keep in mind that a restore will restart the mongodb container.
......@@ -8,7 +8,7 @@ mgmt:
topology:
kinds:
ceos:
image: registry.code.fbi.h-da.de/danet/containers/ceos:4.28.2F
image: registry.code.fbi.h-da.de/danet/containers/ceos:4.29.0.2F
nodes:
ceos0:
kind: ceos
......
#!/bin/sh
file_suffix=$1
docker-compose pause mongo
docker run --rm --volumes-from gosdn-mongo-1 -v $(pwd)/docker_volume_backup:/backup ubuntu bash -c 'cd /data/db/ && tar cvf /backup/mongo_backup_'"$file_suffix"'.tar .'
docker-compose unpause mongo
#!/bin/sh
file_suffix=$1
docker-compose pause mongo
docker run --rm --volumes-from gosdn-mongo-1 -v $(pwd)/docker_volume_backup:/backup ubuntu bash -c 'rm -r /data/db/* && cd /data/db && tar xvf /backup/mongo_backup_'"$file_suffix"'.tar --strip 1'
docker-compose restart mongo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment