Colonel1233
New member
Hey guys !
Recently I was hit by a second MD5 error so I decided to make sure my dedicated server creates some backup saves and so I don't loose hours of work for nothing.
1. (optional) You will need to set up your Task scheduler to run a script if you are looking for automatic save, let's say every 20 minutes (minimum is 1m) or more or less, ass you want. I won't explain here how to use the task scheduler, you can google it.
2. You need to create a new script.ps1 and copy/paste my script lines in it (you can use windows Powershell ISE), further instructions are directly in my script where you need to replace your save path(x) and backup path
etc..
So here is the script :
# This script saves your server files to a backup Folder
#
# (optional) You will need to program Task Scheduler to run this script every 20 min or more (minimum 1 min)
#
# Otherwise you can execute this script manually
#
# X (path) is the source folder with the name of your game/server,(found usually in C:/user/appdata/saves/Your Server)
#
# Y (path) is the destination folder where you want to save your backup (ex: external HDD/SSD)
#
# First You will need to change X and Y bellow by their actual paths
#
$source = X
#
$destination = Y
#
# Then we need to find the current Date & Time and create a folder named after it
#
$date = ((Get-Date).ToString('yyyy_MM_dd_hh_mm_ss'))
New-Item -ItemType Directory -Path $destination -Name $date
#
# Now we want to save the server files in the folder we just created ($date)
#
Copy-Item -Path $source -Recurse -Destination $destination\$date -Force -Confirm:$false
Enjoy !
PS: If my script doesn't work you need to write this : ''Get-ExecutionPolicy''
It should say Restricted (by default) then just type ''Set-ExecutionPolicy Unrestricted'' without the '' of course.
Recently I was hit by a second MD5 error so I decided to make sure my dedicated server creates some backup saves and so I don't loose hours of work for nothing.
1. (optional) You will need to set up your Task scheduler to run a script if you are looking for automatic save, let's say every 20 minutes (minimum is 1m) or more or less, ass you want. I won't explain here how to use the task scheduler, you can google it.
2. You need to create a new script.ps1 and copy/paste my script lines in it (you can use windows Powershell ISE), further instructions are directly in my script where you need to replace your save path(x) and backup path

So here is the script :
# This script saves your server files to a backup Folder
#
# (optional) You will need to program Task Scheduler to run this script every 20 min or more (minimum 1 min)
#
# Otherwise you can execute this script manually
#
# X (path) is the source folder with the name of your game/server,(found usually in C:/user/appdata/saves/Your Server)
#
# Y (path) is the destination folder where you want to save your backup (ex: external HDD/SSD)
#
# First You will need to change X and Y bellow by their actual paths
#
$source = X
#
$destination = Y
#
# Then we need to find the current Date & Time and create a folder named after it
#
$date = ((Get-Date).ToString('yyyy_MM_dd_hh_mm_ss'))
New-Item -ItemType Directory -Path $destination -Name $date
#
# Now we want to save the server files in the folder we just created ($date)
#
Copy-Item -Path $source -Recurse -Destination $destination\$date -Force -Confirm:$false
Enjoy !
PS: If my script doesn't work you need to write this : ''Get-ExecutionPolicy''
It should say Restricted (by default) then just type ''Set-ExecutionPolicy Unrestricted'' without the '' of course.