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

In-game commands #6

Open
awilliamson opened this issue Nov 20, 2016 · 3 comments
Open

In-game commands #6

awilliamson opened this issue Nov 20, 2016 · 3 comments

Comments

@awilliamson
Copy link

Administrators of servers may wish to manually decide when a backup should be performed. Perhaps something experimental is about to be attempted which may result in catastrophic loss of work.

General command-line utilities may be useful to monitor the process of backups, in regards to last backup time, current size of last backup/all backups; as well as management of backups.

Thoughts?

@phit
Copy link

phit commented Nov 20, 2016

I before thought about requesting something simliar, like it'd be nice if you could specifically mark a certain backup as important and ignore it in the deletion progress, but then who really needs that you could just copy the backup manually
same for all the other suggestions, in my opinion all of these tasks are way easier to do with cmdline tools directly

last backup time

sometime in the past 5 minutes, if you really care check the backup folder

current size of last backup/all backups

last/all du -hs last/rootfoldername

management of backups

like deletion? you can you rm -R a backup you don't need, otherwise cp and mv are really only useful in the cmdline anyway

@alexbobp
Copy link
Member

Yeah. Adding some good commands is something I've wanted since the start. Priorities-wise, it's taken a back seat to my primary goal of a mod that does the best it can automatically, and lets you ignore it until disaster strikes. You can see my current milestone on that front at the bottom of the curse page.

A manual backup now command would be the easiest thing in the world to add so maybe I should fast track that idea. It doesn't seem too critical with backups every 5 minutes, but "I want to do something dangerous right now and not lose even a minute of progress" is a valid use case. It will need to be paired with notifications that backups are completed.

I will need to think through things like permissions for triggering backups, and who sees the notifications. Probably don't need permissions on seeing the notifications, so I could just add simple commands to subscribe and unsubscribe to those.

Deleting one individual backup makes no sense to me. If you've done a restore, then deleting backups after the one you restored would make sense, but at that point you already have the server shut down and can do it manually.

Showing backup size is a good idea. I think that doesn't need to be a command, it could just be packed into the above-mentioned backup completed notifications. I would probably like to have the backup notification show the total size of the latest backup (aka current minecraft folder size), as well as the latest backup's disk cost, which can be gotten by doing "du -s secondtolast" and "du -s secondtolast last" and subtracting.

So I guess the main thing to add short term is a backup now command, and subscribable backup notifications. Does that seem reasonable to you two?

Now long term I'd love to add partial restoration commands, but that's going to involve serious buggery with minecraft internals and more than 10x the complexity of the mod :P And I'm pretty new to minecraft modding. Just adding commands at all will be a learning experience for me!

@BinaryAura
Copy link

In addition to a backup now command, I think it would be beneficial to have a restore command. In order for maybe level 3 Ops to restore portions of the server when the server owner is not able (e.g. out of town, in class (I'm a student)) And to possibly make searching easier, the command could include a filter (i.e. before ~1 0 0 before yesterday). I was making some mod plans when a came across this mod.

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

No branches or pull requests

4 participants