mirror of https://github.com/MISP/misp-dashboard
chg: [doc] update doc
parent
9905a82a79
commit
a211f2822e
|
@ -122,8 +122,7 @@ Happy hacking ;)
|
||||||
|
|
||||||
## Restart from scratch
|
## Restart from scratch
|
||||||
|
|
||||||
To restart from scratch and empty all data from your dashboard you can use the [FLUSHDB](https://redis.io/commands/flushdb) or [FLUSHALL](https://redis.io/commands/flushall) command on your redis instance on port `6250`.
|
To restart from scratch and empty all data from your dashboard you can use the dedicated cleaning script ``clean.py``
|
||||||
Or use the dedicated cleaning script ``clean.py``
|
|
||||||
```usage: clean.py [-h] [-b]
|
```usage: clean.py [-h] [-b]
|
||||||
|
|
||||||
Clean data stored in the redis server specified in the configuration file
|
Clean data stored in the redis server specified in the configuration file
|
||||||
|
|
2
clean.py
2
clean.py
|
@ -72,7 +72,9 @@ def cleanSoft(servers):
|
||||||
for db, keys in prefix_keys_per_db.items():
|
for db, keys in prefix_keys_per_db.items():
|
||||||
serv = servers[db]
|
serv = servers[db]
|
||||||
for k in keys:
|
for k in keys:
|
||||||
|
# fetch all keys on the db
|
||||||
key_to_del = serv.keys(k)
|
key_to_del = serv.keys(k)
|
||||||
|
# delete all existing keys
|
||||||
if len(key_to_del) > 0:
|
if len(key_to_del) > 0:
|
||||||
serv.delete(*tuple(key_to_del))
|
serv.delete(*tuple(key_to_del))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue