ServerLogSaver
ServerLogSaver
Description
Simply put, this will backup the server.log file to a directory, and then clear the existing server.log file. This is to reduce RAM usage of the server host and effectively reduce lag for server players.
Most of the functions in this are configurable, such as backup location, time delay between backups, choice of Size and Time rotations and more!
Download the Jar
- ServerLogSaver v2.1.1
- ServerLogSaver v2.1.0
- ServerLogSaver v2.0.2
- ServerLogSaver v2.0.1
- ServerLogSaver v2.0
Download the Source
Old Source ServerLogSaver src v0.1b
Commands
- /sls copy
- /sls zip
Current Features
- User defined time for backup intervals (default time is 1 day, 1440 minutes)
- Backups are time stamped for ease of use
- Compress the logs
- Check for 0 byte content
- Console notice (optional)
- Choice of time/size/restart rotations (Time in minutes/Size in KB/Restart only backs up on server start)
- User defined backup storage location
- User defined backup file names (prefix and time setup)
- In-game command to do backups on will
- Choose the number of logs to keep before purging
To-Do
- Record commands used in a separate file (Probably make a separate plugin for this)
- need more ideas, feed back would help :D
Change-Log
Version 2.1.1
- Updated to 1.2.5 R4.0
Version 2.0.2
- No longer backs up as soon as the server starts with 'time' rotation
Version 2.0.1
- Added 'restart' rotation choice
Version 2.0
- Complete re-code
- Added in-game commands
- Updated to latest config
Incase the DL isnt up when you come onto this page it can be found HERE too
@Royalgamer06
Hmmmm will look into it and think about it. But I think it would be hard to split the [WARNING], [SEVERE], etc since some of them get quite long.
In other news: v2.0.1 is out with a new rotation choice, restart. A new config is not necessary and will only change the comments that i added about the new rotation (limited as they are).
@Kloporte
As of now it already backs up as soon as the server starts up, but then it carries on with the schedule. But you want it to only EVER backup when it restarts? Yea i think that should be simple enough.
Will do it later today.
Thanks bootscreen88 i'll check your solution
Laserhog I was wondering if you could add another rotation choice type : restart It would obviously backup log on server restart
What do you think ?
Relative path is easy on Unix. use a "." for the directory of your craftbukkit.jar followd by a foldername, e.g. CustomLocation: ./Backup/ saves the backup in the folder Backup which is located in the folder where my PluginsFolder and my Craftbukkit.jar are.
@Laserhog Relative path is a path relative to a file : For instance, instead of C:/Program Files/Example Folder, you will have /Example Folder
And you are right i Didn't Think it Through, sorry u_u'
@Kloporte
What is relative path? And if you are using a host I'm pretty sure it would be easier to simply save the logs in the plugins directory.
@po5
Do you have some other plugin that restarts the server every hour? That's the only reason i can think of because it works for everyone else.
I was thinking, it could be great to be able to use relative path for file saving (for those like me who own rent hosting for their server and dont have access to the absolute path)
even tho i am on a time rotation, and set the time to 1440 it will make a new file every hour and not every 24 hour. i am on version 2.0
@bearbear12345
Huh?
permissions?
I'd also like to request timed deletion of old logs. Seems like something this should have.
@deleted_7122950
KB, as i have now added in the features list (i forgot to put it in the new config.yml.....).
Yes, once it reaches the limit it backs up the log. Often it wont happen for a few seconds after it reaches the limit however as i put it on a several second loop of checking.
MaxLogSize: 100????? In bytes or KB/MB?
Also once that limit is reached does it backup the log?
@lawliet555
Alright. for the next version i will work on this. I will make it configurable too, so it could be 7 days or however many you wish. I hope this is possible though, will do some research into this.
I would like to recommend a feature that will delete a backup after 7 days. This will allow allow for space saving and on average you wont need a log that is older then 7 days.
Thx
@Rensik
O yea. Forgot to add those to the description... my bad :D
They are /sls zip and /sls copy
What IS the in-game command to do backups at will? Your list doesn't say. Just says it exists.
Ok, i think the problem may be in the config.yml so...
WHEN UPDATING TO 2.0, PLEASE LET A NEW CONFIG GENERATE.