SecurityRiskAdvisors / VECTR

VECTR is a tool that facilitates tracking of your red and blue team testing activities to measure detection and prevention capabilities across different attack scenarios
1.36k stars 161 forks source link

restore a backup #122

Closed mahdialibi closed 3 years ago

mahdialibi commented 3 years ago

Hi, I don't know if there is a documentation for that but I searched and no answer I want to make a backup of my vectr database and restore it in another installation of Vectr. I can do backup from the menu "backup database" , I see the dump.rdp file in redisdatabut I didn't figure out how to restore this backup in other installation of Vectr. Thank you

SRAPSpencer commented 3 years ago

For backing up and restoring data you have two options.

  1. Copy the "VECTR_DATA" directory set in your .env file and the .env file to a new instance.

  2. Run a mongodump command from inside the container and copy it out. In the new instance extract the dump and place it in the user/mongo directory of VECTR. If a VECTR instance sees an empty "VECTR_DATA" directory on startup it will check the user/mongo directory for a backup to restore.

Note: The Redis database is used for coming functionality. It contains no VECTR data at the time. The MongoDB is where all VECTR data is stored.

mahdialibi commented 3 years ago

thank you

mahdialibi commented 3 years ago

Just a help for those want to get feedback the first option doesn't work for me the second does work and commands are: sudo docker exec -it 03e7b713305a mongodump -u admin -p password replace with your container id ,user, password for mongo from the .env file now copy the dumps to your host sudo docker cp -a 03e7b713305a:/dump/ /mnt/c/backup/ replace with your container ID and destination in the new installation restore the .env file , and copy the dump folder sudo cp -a /mnt/c/backup/dump/* /opt/vectr/user/mongo

launch vectr , all is ok