-
Notifications
You must be signed in to change notification settings - Fork 64
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
Prune functions #55
Comments
I see that you have a non-standard location for your minecraft servers at /home/minecraft, which means that what user you're executing this script at could be a possible problem. What user are you doing it as; you've removed that from your copied command. Also, you can try this command, which will allow you to see the error you're receiving: ./mineos_console.py -s server1 command_prune 4w This command won't actually prune, but tell you the command it runs--the command that is returning the non-zero exit status. It should tell us whether it's a permissions issue or something else. Best guess without any additional information is you've made backups as 'root', which could explain why (as user 'minecraft') you're unable to delete or prune the archives/backups. |
Aha, thanks for that! That is how it was setup by default from the OVH distribution of MineOS which I kind of like even when manually setting it up since the /home partition often by default on hosts has much more space than /var but /var/games/minecraft is symlinked to /home/minecraft. And now when I set MineOS up manually on other servers I place it in /home/minecraft or /home/minecraft/mineos when it's far less likely to run out of disk space which can be important on 120GB SSD drives. Backups are made by minecraft, since they were actually created from using the built-in backup and archive checkboxes in the server.config screens in MineOS.
So it's trying to remove backups from /var/games/minecraft/backup/server1 which obviously doesn't exist other then as a symlink but maybe the rdiff-backup command takes an extra parameter to follow symlinks or something. When I run the command it outputs though I get this:
So I switched the lowercase w to an uppercase W and the command actually ran fine and deleted over a month of incremental backups. I checked in man rdiff-backup and found an option --include-symbolic-links but it seems to run anyway without that, and maybe that would be to include symlinks in the backups and not anything to do with pruning, not much info on it in the manual. So now how can I prune the archives and log files? Do I just have to run a command outside of MineOS or is there a built in way to use so I can easily do it on all the servers? Thank you for your help! Sent a little donation. |
Hi Ryan, Thanks for your donation; it means a lot to me to receive support for my That said, as far as your pruning desires: The web-ui handles pruning of backups and archives quite well--have you For example, I just made a dummy server and 4 archives in succession. On the archives page (and on the backup page) there is a text box which Type in a date (let the autocomplete finish it for you) and hit enter, and Unfortunately, while mineos_console.py does have a prune feature with Unlike backups, however, the file structure is very straightforward: find /var/games/minecraft/archives/servername -mtime +7 -exec rm {} ; There's downsides to bash, though; which is if you do something wrong....it |
Thanks! I have no problem doing the bash prune cron. I was just wondering if there was an easier, nicer, more preferred way to prune the archives and logs on all servers through MineOS in a similar way. The web interface is quite nice but some people tend to forget about the backups filling up the disk space, especially since in my case the disk space indicated in MineOS is not the correct disk space, possibly due to being installed in /home on a different partition than the root or something. If they (the people whose servers they are) create new MC servers or forget to prune the backups regularly then bad stuff may happen. But maybe I can just make a script to loop through all the directories inside the servers directory and clean the archives and logs that way. Thanks again =) |
Logrotate is your friend. It supports globbing, so you could let it rotate all files in
You mean something like this? :) |
Hello,
I'm not sure if this is a bug or not but I'm getting errors. Maybe I'm just doing it wrong but I'm trying to set up a prune cron (that sounds kind of funny). I can't find anything on the wiki about it.
I'm also wondering if there's a way to prune old log files.
I have tried to run both prune and prune_archives but I get errors in both cases. Here is what I've done and what the output is.
Thank you!
The text was updated successfully, but these errors were encountered: