Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added waiting for backups to complete before stopping #248

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

Dashboy1998
Copy link
Contributor

@Dashboy1998 Dashboy1998 commented Feb 1, 2024

Context

  • Currently the container can stop while a backup is running

Choices

  • Using pgrep instead of pidof as pidof only works for child processes
  • Using a loop and array in the event multiple backups are running

Test instructions

  1. Create a large file to force backup to take a while fallocate -l 10G palworld/Pal/Saved/deleteme
  2. Start the container
  3. Stop the server and while creating a backup docker exec -it palworld-server rcon-cli "shutdown 1" && docker exec -it palworld-server backup
  4. Start the container
  5. Run multiple backups
  6. Stop the server/container
  7. Start the container
  8. Stop the container

Tip

If the container is being killed before backup is completed then try increasing stop_grace_period or decreasing the size of the large file.
If the backup is done too quickly to see that it's waiting then try increasing the size large file.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I've added documentation about this change to the README.
  • I've not introduced breaking changes.

@Dashboy1998 Dashboy1998 marked this pull request as ready for review February 1, 2024 01:20
@Dashboy1998 Dashboy1998 mentioned this pull request Feb 1, 2024
@thijsvanloef thijsvanloef merged commit b90c41c into thijsvanloef:main Feb 1, 2024
4 checks passed
MusclePr pushed a commit to MusclePr/palworld-server-docker that referenced this pull request Jun 19, 2024
Added waiting for backups to complete before stopping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants