-
Notifications
You must be signed in to change notification settings - Fork 680
[Question] Error to backup and restore data in thehive4 #2503
Description
Request Type
Question
Work Environment
| Question | Answer |
|---|---|
| OS version (server) | RedHat 8.10 ... |
| Dedicated RAM | 32 GB |
| vCPU | 16 |
| TheHive version | 4.1.24 |
| Package Type | RPM |
| Database | Cassandra / 4.0.17 |
| Index type | Elasticsearch / 7.17 |
| Attachments storage | Local |
| Browser type & version | Google Chrome and Firefox |
Question
What is the exactly steps to backup and restore data in Thehive
I want to move cases to another server with the same cores, disk space and memory but when I try to backup and restore I feel confuse because there are many different steps in the backup and restore page of thehive4
I followed this steps first to backup data
then I followed this steps to restore data
but I can't restore the cases in the new server
In some pages I see that I need this line
forceDropAndRebuildIndex: true
I copy and paste the line in application.conf but when thehive starts is the same I can't see cases, Thehive is empty
I run this commands
Making snapshot:
nodetool cleanup thehive
nodetool snapshot thehive -t backup_name
cd tmp/
when I run this command below I got this
tar cjf backup.tbz /var/lib/cassandra/data/thehive/*/snapshots/backup_name/
tar: Removing leading `/' from member names
Restoring from snapshot
mkdir /tmp/cassandra_backup
this command below doesnt work for me
tar jxf /tmp/backup.tbz -C /
I used this command below instead
tar jxf /tmp/backup.tbz -C /tmp/cassandra_backup
cd /var/lib/cassandra/data/thehive
this command below got errors
for I in ls /var/lib/cassandra/data/thehive ; do yes | cp /var/lib/cassandra/data/thehive/$I/snapshots/backup_name/* /var/lib/cassandra/data/thehive/$I/ ; done
I used this commnad instead
for I in ls /tmp/cassandra_backup/var/lib/cassandra/data/thehive ; do cp /tmp/cassandra_backup/var/lib/cassandra/data/thehive/$I/snapshots/backup_name/* /var/lib/cassandra/data/thehive/$I/ ; done
chown -R cassandra:cassandra /var/lib/cassandra/data/thehive
cd /var/lib/cassandra/commitlog
rm CommitLog-X-XXX1.log
rm CommitLog-X-XXX2.log
service cassandra restart
service thehive restart
but I can't restore it
Anyone can help me please to explain me the right steps to backup and restore data to another server with Thehive4 or anyone that found any solution
thank you so much in advance


