KagurazakaNyaa / palworld-docker

Palworld dedicated server with docker
https://hub.docker.com/r/kagurazakanyaa/palworld
GNU Affero General Public License v3.0
91 stars 16 forks source link

Feature: Backup and Memory management #11

Open ic3man5 opened 5 months ago

ic3man5 commented 5 months ago

First off thank you for providing this. I've been using it for a while now successfully with 8 people. I'm having issues with sav file corruptions and memory leaks.

I'm in process of writing a python script to do a few things:

  1. check memory usage.
  2. issue /save and /shutdown rcon commands.
  3. backup Saved/SaveGames/0/*/Players to /backup (probably hourly as a cron job).
  4. restart server when memory usage is hit.

Would you be interested in a pull request to add these things?

ayakasuki commented 5 months ago

首先感谢您提供这个。我已经与 8 个人成功使用了一段时间。我遇到了 sav 文件损坏和内存泄漏的问题。

我正在编写一个 python 脚本来做一些事情:

  1. 检查内存使用情况。
  2. 发出 /save 和 /shutdown rcon 命令。
  3. 备份Saved/SaveGames/0/*/Players到 /backup (可能每小时作为 cron 作业)。
  4. 当内存使用达到上限时重新启动服务器。

您对添加这些内容的拉取请求感兴趣吗?

Memory leaks now there is a better way

KagurazakaNyaa commented 5 months ago

First off thank you for providing this. I've been using it for a while now successfully with 8 people. I'm having issues with sav file corruptions and memory leaks.

I'm in process of writing a python script to do a few things:

1. check memory usage.

2. issue /save and /shutdown rcon commands.

3. backup `Saved/SaveGames/0/*/Players` to /backup (probably hourly as a cron job).

4. restart server when memory usage is hit.

Would you be interested in a pull request to add these things?

For save backup, I personally use another container for automatic backup.

  backup:
    image: jareware/docker-volume-backup
    restart: unless-stopped
    network_mode: bridge
    environment:
      - BACKUP_CRON_EXPRESSION=*/10 * * * *
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./data:/backup/palworld-data:ro
      - ./backups:/archive
ic3man5 commented 5 months ago

Awesome, I'll check this out. I'm currently in process of writing an app to be able to manage the server better here:

https://github.com/ic3man5/rcon_palworld

I'm hoping I can do everything remotely once I complete it. The backup stuff is very helpful though, thanks