![]() |
ZippySQL v1.0
I am posting this on behalf of iMagic the creator of this script / system.
Hello Some folks from the Graalians Discord had asked me to post this in one of the forums for posterity. Introduction FeaturesZippySQL is a robust tool for managing backups in a Graal server. It allows server administrators to create, manage, and automate backups of critical server files such as logs, images, ganis, and/or databases and to easily download them in the form of .zip files. The tool is built with scalability and flood control in mind, ensuring that backups can be performed efficiently without triggering server flood alerts (which unfortunately sometimes can be difficult to avoid!). (P.S. I know reading a wall of text can't be that much fun, so I made a quick video to summarize the following as best as I could.)
Setup Server Access: Ensure that the npcserver has read/write access to the folders and files you want to back up to avoid errors. The npcserver should have the following right: NPC Code:rw backups/ SQLite Database: Add the following database to your server options to create the SQLite database: NPC Code:database=zippy,zippy Folder Config: You must add the backups folder to the server's folder configuration. Make sure to add the following: NPC Code:file backups/ Source Code: A `.txt` file for the source code was apparently too big to upload to the forums. You can click this link to pastebin instead to get the source code https://pastebin.com/CaXqkady --- Caveats ZippySQL is limited quite meaningfully by GS2 itself. Flood Alerts: The script may cause flood alerts. Flood alerts CAN KEEP OTHER SCRIPTS FROM RUNNING APPROPRIATELY! Flood alerts occur when the server exceeds a certain amount of read-write operations. These boundaries are not well-known and therefore difficult to navigate. The `FLOOD_CONTROL` enum contains properties that can be tweaked (if you know what you're doing!) to reduce the risk of flood alerts. Impossible Reads: In what is arguably a good thing (and clearly a safety precaution), the GS2 functions `TGraalVar.loadstring()` and `TGraalVar.loadlines()` (which are used to read the contents of files) cannot read files in various folders such as `weapons/`, `scripts/`, and `accounts/` among a few others. Therefore, this tool cannot backup files located in these folders. High CPU Usage: Because of the nature of the tool, it needs to perform A LOT of operations across possibly hundreds if not thousands of files. Most specifically, the `onFinishZip()` function, which compiles the contents of all of the backed-up files into the singular zip file. If high CPU usage is a problem, I recommend changing the configuration accordingly at the expense of backups which take longer to compile. Exponential File Size Growth: ZippySQL can theoretically create infinite-many backups. In the lack of infinite storage, this is clearly a problem. It is recommended that as few files as possible are backed up, that larger files such as images and gifs are avoided if possible from being backed up, and that if possible, lifespans for backups are as short as possible (permanent backups are highly discouraged!). --- Examples To start a backup, we call the Quote:
Quote:
Example 01: Full Backup NPC Code:public function onFullBackupExample() { Example 02: Backup Logs folder NPC Code:public function onLogsBackupExample() { Example 03: Custom Backup NPC Code:public function onCustomBackupExample() { Bugs If you encounter any issues, find any bugs, have any ideas, or have any questions, feel free to message me on Discord: imimagic I hope this tool is able to help you in some way. Until the next time! |
thank you!
|
All times are GMT +2. The time now is 10:13 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.