I need some pointers, or a push in the right direction to figure out how to write a batch file to backup my 7 Days to Die server
What I want to do is have the batch file save my server game data, and then copy the files to a new drive, essentially creating stampeded backups.
I’m very new to this, and my problem is having the batch file save my data.
So I have a “Save” batch file.
telnet localhost <Port#>
#Timeout here? Probably not needed
@echo off
echo saveworld
In order to save a 7 Days game server, you telnet into it and simply type saveworld. My problem is is that once the batch file telnets, it will not type the saveworld command.
From a few Google searches, people said a batch file cannot input any commands after it telnets, they say I might need a powershell script. Is this true?
But my backup works fine after I manually save the data!
mkdir 7daysserverbackup
xcopy /E /K /Y “Server File Path” "Backup File Path"
ren “7daysserverbackup” “%date:/=-% %time::=-%”
This batch file creates a folder, copies the files I want into it, and renames it with a time stamp.
Is there a way I can have it zip the folder as well?
Thanks you for any input I don’t need anyone to tell me exactly what I need to write, but a link to a website would be great! Unless you’re bored and want something to do