Server Setup (Linux, Oracle Cloud): Difference between revisions

Change FTBu and FTBlib to ServerUtilities as the recommended backup option.
(Change FTBu and FTBlib to ServerUtilities as the recommended backup option.)
Line 191:
===Install a mod for backups===
<div align="justify">
The recommended mod for backups is server utilities.
Two mods are needed to back up your server: FTB-Utilities and FTB-Library.
*FTB-UtilitiesThe download is located here: https://github.com/GTNewHorizons/FTB-UtilitiesServerUtilities/releases/latest/
*FTB-Library is located here: https://github.com/GTNewHorizons/FTB-Library/releases/latest
 
Below is an example of how the process can go. Check if it's the most recent version of the mods before proceeding.
Line 203 ⟶ 202:
* Using <code>wget</code> : <syntaxhighlight lang="shell">
cd server_directory/mods
wget $(curl -s https://api.github.com/repos/GTNewHorizons/FTB-UtilitiesServerUtilities/releases/latest | grep browser_download_url | tail download/2.0.11/ServerUtilities-n 1 | cut -d '"' -f 4)2.0.11.jar
wget $(curl -s https://api.github.com/repos/GTNewHorizons/FTB-Library/releases/latest | grep browser_download_url | tail -n 1 | cut -d '"' -f 4)
</syntaxhighlight>
 
* Using <code>scp</code> : <syntaxhighlight lang="shell">
scp -i path_to_private_SSH_key path_to_FTBUtilities_on_your_computerpath_to_ServerUtils_on_your_computer opc@instance_ip:server_folder/mods/FTBUtilities_full_nameServerUtilities_full_name.jar
scp -i path_to_private_SSH_key path_to_FTBLib_on_your_computer opc@instance_ip:server_folder/mods/FTBLib_full_name.jar
</syntaxhighlight>
 
Line 215 ⟶ 212:
 
<syntaxhighlight lang="output">
scp -i ~/.ssh/ssh-key-2022-09-07.key ~/Downloads/FTBUtilitiesServerUtilities-1.7.10-12.0.18.7-GTNH11.jar opc@144.24.170.228:~/minecraft-server/mods/FTBUtilitiesServerUtilities-1.7.10-12.0.18.7-GTNH11.jar
 
scp -i ~/.ssh/ssh-key-2022-09-07.key ~/Downloads/FTBLib-1.7.10-1.0.18.5-GTNH.jar opc@144.24.170.228:~/minecraft-server/mods/FTBLib-1.7.10-1.0.18.5-GTNH.jar
</syntaxhighlight>
* scp is the command that stands for "secure copy",
*-i is the flag that says to use the file to identify youself, like we did with ssh,
*~/.ssh/ssh-key-2022-09-07.key is the example of the path to the key, ~ is the shortcut for you user folder,
*~/Downloads/FTBLibServerUtilities-{version}.jar is the location of the mod jar on your computer,
*opc@144.24.170.228:~/minecraft-server/mods/FTBLibServerUtilities-{Minecraft version}-{version}-GTNH.jar is the location of the resulting file on the server.
 
Now you can launch your server again to check if the backup works.
Line 228 ⟶ 225:
A backup should be visible in the log immediately after the server is done loading.
 
The default frequency of the backups is once every two hours. To make the backups more frequent, open the config file that is created after the server is launched for the first time with the backup mods. The following steps use <code>vim</code> as the default text editor to edit <code>config.json</code> , you may use other text editor such as <code>nano</code> . A more detailed description of config can be found at [[ServerUtilities]].
 
<syntaxhighlight lang="bash">
cd your_instance/serverutilities/
cd server_folder/local/ftbu
vim configserverutilities.jsoncfg
</syntaxhighlight>
 
Line 240 ⟶ 237:
#<code>backup_timer</code> default is 2.0, If you want to make a backup every 30 minutes, change the value from 2.0 to 0.5.
#<code>backups_to_keep</code> Change to keep more backups. When the number reaches the specified maximum, the oldest backup is deleted.
# <code>Folderbackup_folder_path</code> specify the path of the backups. The default works too.
#To exit vim and save the changes, press <code>:</code> then type <code>wq</code> and press <code>ENTER</code> , wq which means Write and Quit.
#If you get an error on writing changes into the file, check the file permissions. Although if the error is about that you can't write into the file and that's your default user, that likely means that you launched the server as root before, which can lead to many complications later, so please don't launch a server as root.
Line 257 ⟶ 254:
 
To start a backup manually, send the following command when you're on the server: <syntaxhighlight lang="text">
/admin backup start
</syntaxhighlight>
 
12

edits