Server Setup (Linux, Oracle Cloud): Difference between revisions
Server Setup (Linux, Oracle Cloud) (view source)
Revision as of 15:09, 25 January 2024
, 5 months agoadd bit more detail
m (intro, formatting) |
ReikoBest2D (talk | contribs) m (add bit more detail) |
||
(2 intermediate revisions by 2 users not shown) | |||
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 201 ⟶ 200:
Below are the examples of both ways. Please use the <code>scp</code> option only if the <code>wget</code> one fails:
* Using <code>wget</code> (you can get the link by right-clicking on correct jar and choosing "Copy link adress" ): <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>
Line 265 ⟶ 262:
===Run the server===
<div align="justify">
So, you can launch the server, but when you leave the ssh connection, the server closes. That happens because
To make the server run without you being connected to the ssh, one of the solutions is to use the "screen" command.
Line 293 ⟶ 290:
There are more options that you can use with this command, such as multiple named screens. You can check [https://linuxize.com/post/how-to-use-linux-screen/ this] manual for the instructions. or run the command <code>man screen</code>.
</div>
===Improvements===
====More space====
|