Server Setup (Linux, Oracle Cloud): Difference between revisions
Server Setup (Linux, Oracle Cloud) (view source)
Revision as of 15:06, 25 January 2024
, 5 months agoChange FTBu and FTBlib to ServerUtilities as the recommended backup option.
m (→Run the server: wording) |
ReikoBest2D (talk | contribs) (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.
*
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
</syntaxhighlight>
* Using <code>scp</code> : <syntaxhighlight lang="shell">
scp -i path_to_private_SSH_key
</syntaxhighlight>
Line 215 ⟶ 212:
<syntaxhighlight lang="output">
scp -i ~/.ssh/ssh-key-2022-09-07.key ~/Downloads/
</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/
*opc@144.24.170.228:~/minecraft-server/mods/
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/
vim
</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>
#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">
/
</syntaxhighlight>
|