itzg / docker-mc-backup

Provides a side-car container to backup itzg/minecraft-server world data
https://hub.docker.com/r/itzg/mc-backup
MIT License
332 stars 52 forks source link

Readme.md contains confusing suggestions for rclone.conf #116

Open dreylok opened 1 year ago

dreylok commented 1 year ago

The Readme.md could use some improvement regarding rclone.conf file. The examples suggest using a file mount, however, rclone requires write access to the file and creates a new temporary file when making updates, so a directory mount seems to be necessary.

There are multiple references:

An example mount is given in the rclone backup method section: - ./rclone.config:/config/rclone/rclone.conf:ro

This is mounting the file itself, however, rclone creates a new temporary file when it edits the rclone.conf file, so a folder mount seems to be necessary. Also, the source file is named rclone.config and this may be confusing.

Another reference exists in the Restic with rclone section:

volumes:
# mount volume pre-configured using a host mounted file
- ./rclone.conf:/config/rclone/rclone.conf

It will be helpful to also point out that the mount needs to be mounted rw.

Lastly, a Troubleshooting section that mentions "setting the environment variable DEBUG to true" may be useful for readers.

dreylok commented 1 year ago

Related to Issue 79

gadget78 commented 1 year ago

yeah this is odd, and it has caused BIG issues for me, more by mistake tbh, but still... its resulted in what can only be described as a BUG, see below...

what would be MUCH better is having this rclone.conf file on the /backup volume.. i have original here, and have to remember to copy it over to /config/rclone/ when i re-deploy, or edit the docker, as the /config gets deleted (leading to the bug below)

which is ... if it DOESNT find a rclone.conf file,.. then the world backup file its just created, obviously, doesn't get sent, and so process tries again...but instead of just trying to re-connect, its starts the backup procedure again .. without deleting the one its just created..

this continuingly happens, until the HDD space is TOTALLY used up and the server crashes... and the reason it cashes is because the server tries to write to file and cannot fully as of lack of space, so it corrupts them. which results in MAJOR server issues, and ironically requires a backup, of which couldn't be sent, and now cannot easily be extracted as the HDD is completely full, which has resulted in access issues!

itzg commented 1 year ago

It's admittedly not intuitive but XDG_CONFIG_HOME is what specifies the directory of the rclone config. You're welcome to set that to be your backup path.

So what I see is needed

gadget78 commented 1 year ago

ooo only just noticed this reply ! (didnt get a ping, or it got lost in notification noise lol) yes this will help greatly ! (and yes better docs always help) Thankyou !