Export/Backup T-Pot Data #1753
encient
started this conversation in
Show and tell
Replies: 1 comment
-
Hey thank you for the article. Did you by any way find a way to reset the logs at a given point in time? Like say "right" now? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've seen several discussion posts about importing and exporting or backing up the T-Pot data, but there is no full write-up or steps on it.
As mentioned in T-Pot README, all log files are stored in
~/tpotce/data
. However, according to this issue, if you import the folder straight away (by replacing your~/tpotce/data
folder), Kibana will show fewer logs as compared to your original data. According to the author who replied to the mentioned issue post, it is because of the default mode of how logstash handles files (you can refer to the issue for more information).Anyway, I've successfully imported the backup file to my local instance, so I'll be providing a full guide just in case anyone needs it.
Given the scenario, I want to export my public T-Pot and import it into my local T-Pot.
Step 1: Replace
~/tpotce/data
of public T-Pot to local T-Pot~/tpotce/data
of your public T-Pot and transfer it to your local T-Pot~/tpotce/data
of your local T-Pot, and replace it with the one you importedStep 2: Extract the current
logstash.conf
file from your local T-Potsystemctl stop tpot
to prevent conflict as we are going to modify the file laterStep 3: Modify
logstash.conf
logstash.conf
in/data/elk
folder, we can modify this file according to our needsinput
section, add these 3 lines for allfile
block (means all honeypots that you are using)Step 4: Set correct permissions for your new
logstash.conf
Step 5: Modify
~/tpotce/docker-compose.yml
to consume the newlogstash.conf
${TPOT_DATA_PATH}/elk/logstash.conf:/etc/logstash/logstash.conf
involumes
sectionStep 6: Start T-Pot service
systemctl start tpot
I hope this helps!
Beta Was this translation helpful? Give feedback.
All reactions