阿里云幻兽帕鲁服务器想像以前一样手动更新,可以发下代码不?直接运行官方手册里安装PalServer的命令就可以了,本就能更新
steamcmd +login anonymous +app_update 2394010 validate +quit这种?
看文档https://developer.aliyun.com/article/1428087?spm=a2c6h.12873639.article-detail.16.18fa300aJRWekh ,此回答整理自钉群“阿里云幻兽帕鲁服务器(官方钉1群)”
升级步骤(脚本)
请远程登录ECS实例,通过如下命令进行游戏服务端升级。
(若您不希望通过如下命令进行升级,请参考迁移到计算巢教程重新迁移到计算巢,从而获得计算巢最新版本一键升级的能力)
Linux系统请复制粘贴如下命令执行:
sudo systemctl stop pal-server
SOURCE="/home/ecs-assist-user/.steam/SteamApps/common/PalServer/Pal/Saved"
BACKUP_BASE="/home/ecs-assist-user/.steam/SteamApps/common/PalServer/Pal/Saved_Backup"
mkdir -p "${BACKUP_BASE}"
TIMESTAMP=$(date +"%Y%m%d%H%M")
NEW_BACKUP_DIR="BACKUPBASE/Saved−BACKUPBASE/Saved−{BACKUP_BASE}/Saved-{TIMESTAMP}"
rsync -av --delete "SOURCE/""SOURCE/""SOURCE/" "NEW_BACKUP_DIR"
/usr/games/steamcmd +login anonymous +app_update 2394010 validate +quit
sudo systemctl restart pal-server
Windows系统请复制粘贴如下命令执行:
$TaskName = "PalServerAutoStart"
$ProcessName = "PalServer-Win64-Test-Cmd"
if (Get-Process -Name $ProcessName -ErrorAction SilentlyContinue) {
Stop-Process -Name $ProcessName -Force
Start-Sleep -Seconds 1
}
$sourceDir = "C:\Program Files\PalServer\steam\steamapps\common\PalServer\Pal\Saved"
$destinationDir = "C:\Program Files\PalServer\steam\steamapps\common\PalServer\Pal\Saved_Backup"
if (-not (Test-Path -Path $destinationDir)) {
New-Item -Path $destinationDir -ItemType Directory
}
$timestamp = Get-Date -Format "yyyyMMddHHmm"
backupDir=Join−PathbackupDir=Join−PathbackupDir = Join-Path destinationDir ("Saved-" + $timestamp)
Copy-Item -Path sourceDir−DestinationsourceDir−DestinationsourceDir -Destination backupDir -Recurse -Force
& "C:\Program Files\PalServer\steam\steamcmd.exe" +login anonymous +app_update 2394010 validate +quit
Start-ScheduledTask -TaskName $TaskName
https://developer.aliyun.com/article/1428087?spm=a2c6h.13066369.question.7.2e44492ad6k3tB
sudo systemctl stop pal-server
SOURCE="/home/ecs-assist-user/.steam/SteamApps/common/PalServer/Pal/Saved"
BACKUP_BASE="/home/ecs-assist-user/.steam/SteamApps/common/PalServer/Pal/Saved_Backup"
mkdir -p "${BACKUP_BASE}"
TIMESTAMP=$(date +"%Y%m%d%H%M")
NEW_BACKUP_DIR="BACKUPBASE/Saved−BACKUPBASE/Saved−{BACKUP_BASE}/Saved-{TIMESTAMP}"
rsync -av --delete "SOURCE/""SOURCE/""SOURCE/" "NEW_BACKUP_DIR"
/usr/games/steamcmd +login anonymous +app_update 2394010 validate +quit
sudo systemctl restart pal-server
$TaskName = "PalServerAutoStart"
$ProcessName = "PalServer-Win64-Test-Cmd"
if (Get-Process -Name $ProcessName -ErrorAction SilentlyContinue) {
Stop-Process -Name $ProcessName -Force
Start-Sleep -Seconds 1
}
$sourceDir = "C:\Program Files\PalServer\steam\steamapps\common\PalServer\Pal\Saved"
$destinationDir = "C:\Program Files\PalServer\steam\steamapps\common\PalServer\Pal\Saved_Backup"
if (-not (Test-Path -Path $destinationDir)) {
New-Item -Path $destinationDir -ItemType Directory
}
$timestamp = Get-Date -Format "yyyyMMddHHmm"
backupDir=Join−PathbackupDir=Join−PathbackupDir = Join-Path destinationDir ("Saved-" + $timestamp)
Copy-Item -Path sourceDir−DestinationsourceDir−DestinationsourceDir -Destination backupDir -Recurse -Force
& "C:\Program Files\PalServer\steam\steamcmd.exe" +login anonymous +app_update 2394010 validate +quit
Start-ScheduledTask -TaskName $TaskName
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。