Difference between revisions of "Backup Solutions"

From Luanti Wiki
Jump to navigation Jump to search
(rename Minetest to Luanti)
(Replaced content with "[https://dev.luanti.org/backup-solutions/ This page has moved to the Luanti Developer Wiki!]")
Tag: Replaced
 
Line 1: Line 1:
Backing up Luanti data can be a real pain due to the size and complexity of some worlds and mods. We have written this guide to provide you with some information regarding backing up data.
+
[https://dev.luanti.org/backup-solutions/ This page has moved to the Luanti Developer Wiki!]
 
 
== World Backups ==
 
[[Worlds]] will usually be contained in the Luanti data directory under the <code>worlds</code> directory.
 
 
 
Inside, one can see the individual worlds. For the structure of the worlds directory, see [[https://wiki.minetest.net/Worlds#World_directory_content the relevant wiki page]].
 
 
 
To back up a world, these are some solutions:
 
 
 
{| class="wikitable"
 
|+ World Backup Solutions
 
|-
 
! Solution !! Details !! Strengths and weaknesses
 
|-
 
| Copying the directoy || By taking the world directory and copying it somewhere else, a simple backup may be achieved. || Will double the space taken by the world and is not very efficent
 
|-
 
| Git || Using a git repository to contain the world || Again, git will take the world and save it under the .git directory for keepeing. It can be good for documenting changes but is not reccomended for most usecases
 
|-
 
| Compression || Using a compression algorithm to make the world smaller || Makes a smaller file, reducing total space taken, but can be slow or memory-intensive on some devices.
 
|}
 
 
 
== Mod Backups ==
 
Due to the constantly-changing nature of mods (which both makes them securer and insecurer), creating a backup is not reccomended. Mods will eventually grow out of date and you will both miss out on the latest features and security fixes.
 
 
 
Mods can be backed up in the same way as worlds, or you could use the following script:
 
 
 
One can write down git repositories in a file and use the following script to download them again:
 
 
 
<syntaxhighlight lang="python">
 
import os
 
 
 
# Read the file containing the list of repositories
 
with open('repositories.txt') as f:
 
    repositories = f.readlines()
 
 
 
# Loop through the repositories and clone each one
 
for repo in repositories:
 
    # Remove any whitespace or newlines from the repository URL
 
    repo = repo.strip()
 
 
 
    # Clone the repository using Git
 
    os.system(f'git clone {repo}')
 
</syntaxhighlight>
 
 
 
This approach can work quite well if you want the latest features and to be able to update things.
 
 
 
== User Data ==
 
Other user data is important.
 
 
 
<code>minetest.conf</code> in the root directory will contain all the setting you changed, and the <code>screenshots</code> directory contains any photos you made.
 

Latest revision as of 20:29, 15 December 2024