With this plugin you can sync files with all of your servers. The files get synchronized via MySQL. So you will need a MySQL database with enough sorage to store your files. But this also means you can sync the files with multiple hosts! The servers don't need to be on the same machine.
Warning: This plugin is still under developement Please make a backup of your files before you use it, just to be save.
Main Features - Sync via MySQL | The servers don't need to be on the same host
- It runs almost completely ASync (Multi-Threading), so it won't take much performance from your server
- It supports all FileTypes
- Groups | You have a file that only should be synced with a specific type of server? No problem, just make a group!
- Fully configurable
- Easy to use
- Completely free and Open Source!
- High quality
How to install 1. Download the plugin and put it on one of your servers 2. Restart the server 3. Configure MySQL (and other settings) 4. Copy the plugin and config folder to the other servers 5. Restart all servers
This is it! Now, type the command /fs add <group> <file> Make sure you also include the filepath. So if your file is in the plugins folder, you have to type for example /fs add default plugins/SomePlugin.jar
After that the files are in Sync, as easy as that!
You just have to wait for the sync intervals. But it can take up to double as long as you have configured in the config.yml.
This is because it first sends the file to MySQL on a interval. Then the interval needs to be executed on the other server to download this file.
Commands /sf info; /sf about
-> Shows infos about the plugin
/sf menu (coming soon)
-> Opens a menu
/sf groups
-> List all groups
/sf list <group>
-> Shows all files in a group
/sf add <group> <file>
-> Add a new file to sync
/sf remove <group> <file>
-> Removes a file from sync (No files on disk will be deleted)
/sf sync [group] [file]
-> Force to sync now if you don't want to wait for the next interval. You can sync all, all in a group or a single file.
/sf reload
-> Reload the config
/sf update
-> Download the newest version
/sf help
-> Shows all commands The default permission is 'filesync.command'. There is only one permission for all commands. You can configurate this permission and set it to 'none' if you only want to allow console.
Planned Features: - Menu (Open a inventory where you can add/remove (and maybe more) synced files) - BungeeSupport - Own commands - A command that will be executed after the file has synced, for example if you are syncing config files, you can set the command for that plugin to reload the config.
Code (Text):
#####################################################################################################
### FileSync - Automatically sync your files with all of your servers ###
### ###
### For bugreports and proposals join our Discord: https://discord.gg/p95cB9YQFJ ###
### ###
### You can find the source code at: https://github.com/Xitee1/FileSync ###
#####################################################################################################
##################################
### The most important - MySQL ###
##################################
mysql:
host: '127.0.0.1' # You should use 127.0.0.1 instead of localhost (It means the same)
port: 3306
user: 'admin'
password: 'YourPassword'
database: 'minecraft'
table-prefix: 'fs_'
useSSL: true
#############################
### Configure the command ###
#############################
# Change the default commands (Not working yet! - Will be available in some new version - If it gets added you will see it in the changelog)
commands:
- fs
- filesync
# The permission that players need to execute the command (set it to 'none' to only allow console)
permission: 'filesync.command'
#######################################################
### Sync-Options (Only used if the API is disabled) ###
#######################################################
sync:
allowUpload: true # Allow that this server uploads modified files (You have to enable this at least on one server!)
interval: 30 # Change the sync interval. Default: 30 seconds
groups: # Which groups should be synced with THIS server
- default
######################
### Plugin Updater ###
######################
update:
notification: true # Send a message to all Admins on join if a new update is available
autoupdater: false # With this option, the plugin will be automatically updatet
###########
### API ###
###########
# Only enable the API if you want to use "setAllowUpload()", "setGroups()" and "startSyncScheduler()"
# Before you use the API you should have a look at the description at https://github.com/Xitee1/FileSync
api: false
# Here you can enable debug messages if you have some problems
debug: false
################
### Messages ###
################
messages:
prefix: '&7[&cFileSync&7] '
onlyConsole: '&cYou can only execute this command from the console!'
noPerm: '&cYou do not have the permission to execute this command!'
wrongSyntax: '&cWrong Syntax! Type &b/fs help&c to see all commands.'
reload: '&aReloaded the config.'
update:
msg: '&7A new version is available (&bv%newest_version%&7)! Your version: &bv%current_version%'
updaterDisabled: '&7The auto-updater is disabled in your config.yml. Type &b/fs update &7to update to the newest version.'
updaterEnabled: '&7The plugin will be updated automatically after a server restart.'
downloading: '&7Downloading newest version...'
downloadFinished: '&7Download &asuccessful! &7Please &arestart &7your server to apply the new version.'
downloadFailed: '&cDownload failed! &7Please try it later again. The download-server currently not reachable.'
listGroups:
msg: '&7All Groups:'
list: '&7-&b %group%'
listFiles:
notExist: '&cThis group does not exist!'
msg: '&7All files in group &b%group%&3:'
list: '&7-&b %file%'
addFile:
doesNotExists: '&cThis file does not exists on the disk!'
alreadyExists: '&cYou already added the file &b%file%&c to group &b%group%&c!'
successful: '&7You have &aadded&7 the folder/file &b%file%&7 to the group &b%group%'
removeFile:
notExist: '&cThe file &b%file%&c in the group &b%group%&c does not exists! Make sure to provide the whole path.'
successful: '&7You have &cremoved&7 the file &b%file%&7 in the group &b%group%'
forceSync:
all:
starting: '&7Syncing all files...'
finished: '&aAll files are now up to date!'
group:
starting: '&7Syncing all files in group %group%...'
finished: '&aAll files in group %group% are now up to date!'
file:
starting: '&7Syncing the file %file% in group %group%...'
finished: '&aThe file is now synced!'
help:
msg: '&7All commands:'
list: '&7-&b %command%'
fileWarning: '&cImportant: &7If the file is in a folder, you have to specify the folder! For example, you want to sync a plugin in the plugins folder. You have to type /fs add <group> plugins/SomePlugin.jar'
I hope you enjoy this Plugin!
Please do not give a bad rating because of bugs! Please report them to my Discord or GitHub and i will try to fix them as fast as possible!
This is a completely free plugin that I code in my spare time. I would really appreciate a donation
If you have any ideas for new features, or found a bug, just join my Discord.