Connect to the Sheriff Console through SSH and use your credentials to log in.
The Sheriff Setup menu displays.
On the Sheriff Setup main menu, select Jailbreak System to gain command line access.
Select Yes when prompted. You will be in the root directory.
On the command line, type the following command:
screen
We recommend using the screen session so that you can keep the program running even after you log out.
Back up the MongoDB database and create the dump directory:
mongodump --host localhost
Compress the file:
tar cvfz sheriff-mongodb-`date +%s`.tgz dump
Adding `date +%s`
to the filename gives it a unique time stamp.
Remove the dump directory:
rm -rf ./dump
sheriff-mongodb-<timestamp>.tgz
file. Transfer the file to the target system. You can use either an SFTP client on Windows, such as WinSCP; or the SCP protocol on Linux.
Connect to the Sheriff Console through SSH and use your credentials to log in.
The Sheriff Setup menu displays.
On the Sheriff Setup main menu, select Jailbreak System to gain command line access.
Select Yes when prompted. You will be in the root directory.
On the command line, type the following command:
screen
We recommend using the screen session so that you can keep the program running even after you log out.
Stop the following services so that they do not interfere with the process:
/etc/init.d/monit stop /etc/init.d/vigilante-server stop /etc/init.d/vigilante-agent stop /etc/init.d/vigilante-framework stop /etc/init.d/sheriff-api stop
Extract the file:
tar xvzf sheriff-mongodb-<timestamp>.tgz
Restore the backup file
mongorestore --db inventory dump/inventory
Remove the dump directory:
rm -rf ./dump
Restart all services for changes to apply:
sheriff-reconfig -c -v -d