# Updating

> How Oasis tells you about a new build, how to update Oasis and Packs Server, what happens if their versions don't match, and how to go back to an older version.

Source: https://oasis-protection.com/docs/updating/

On Packs Embedded, an update is a new jar and a restart. With Packs Server there are two parts to update, and Oasis tells you if the two don’t match. Your history isn’t converted, so an older version can usually read it again if you go back.

## Finding out about updates

Oasis looks for a newer build when your server starts and every six hours after that. When it finds one, it names it in the console once each time the server starts. If you run Packs Server and the new build needs a newer one, Oasis says that too, as soon as it reaches Packs Server:

```plaintext
Oasis build 42 (3.2) is out. This server runs build 41. Get it from https://oasis-protection.com/downloads/
Before you update to Oasis build 42, update Packs Server to 3.2 (e4f5a6b) or newer. This Packs Server is 3.1 (c7d8e9f).
```

Until you install it, the last line of `/oasis status` names the build, the Packs Server it needs, and the Downloads page; click it to open the page. When you run the newest build, that line isn’t there.

* A dev build tells you about the newest build. A release tells you only about newer releases.
* Dev builds of Packs Server come from their own package repository. See [Install Packs Server](/docs/packs-server/setup/#1-install-packs-server).
* Oasis never downloads or installs an update by itself. Get the jar from [Downloads](/downloads/), which lists the changes in each build.
* The check reads one small file from oasis-protection.com and sends nothing about your server but the Oasis version. If the site can’t be reached, Oasis stays quiet and tries again at the next check.
* To turn the check off, set `updates.check` to `false` in `config.yml` and run `/oasis reload`.
* A jar you built yourself has no build number, so it doesn’t look for updates.

## Update Oasis on Packs Embedded

If you run Packs Embedded (the default), there is only one jar to update.

1. Stop your server.

2. Put the new Oasis jar from [Downloads](/downloads/) in `plugins` in place of the old one.

3. Start your server.

4. Run `/oasis status` and check that it says `Logging: up to date`.

## Update Oasis and Packs Server

If you run Packs Server, update both at the same time. Oasis and Packs Server come out together, and a matching pair always works.

1. Update Packs Server on its machine. This updates Packs Server and nothing else, and restarts it by itself:

   **Debian and Ubuntu**

   Terminal window

   ```sh
   apt update
   apt install --only-upgrade packs
   ```

   If `apt update` brings no new Packs Server, look at `/etc/apt/sources.list.d/packs.list`. It must name `packs-server-deb` or `packs-server-deb-dev`. If it names `packs-server` or `packs-server-dev`, run the block in [Install Packs Server](/docs/packs-server/setup/#1-install-packs-server) again.

   **Fedora and RHEL**

   Terminal window

   ```sh
   dnf upgrade packs
   ```

   **openSUSE**

   Terminal window

   ```sh
   zypper update packs
   ```

   **Arch Linux**

   Terminal window

   ```sh
   pacman -Syu
   ```

   Arch updates the whole system at once, because it doesn’t support updating one package alone.

2. Stop your Minecraft server, put the new Oasis jar from [Downloads](/downloads/) in `plugins` in place of the old one, and start it again.

3. Run `/oasis status` and check that it says `Logging: up to date`.

Your server keeps logging between the two steps. If the new Packs Server needs the new Oasis, Oasis holds new edits in `plugins/Oasis/outbox` and sends them once both match. Lookups and rollbacks wait until then.

Tip

You can update Packs Server while your Minecraft server runs. Oasis connects again by itself.

## If the versions don’t match

Sometimes a newer Oasis works with an older Packs Server, or the other way around. Oasis checks this each time it connects. When the pair can’t work together, Oasis tells you in the console, in `/oasis status`, and in the reply to any command that needs Packs Server. The message names the part to update, the version to update to, and what changed. For example:

```plaintext
Oasis 3.2 (a1b2c3d) with Packs 3.2 (e4f5a6b) needs a newer Packs Server than 3.1 (c7d8e9f).
Update Packs Server to 3.2 (e4f5a6b) or newer. It lacks: Logins record the address of the player.
```

While the message shows:

* Oasis keeps logging. New edits wait in `plugins/Oasis/outbox`.
* Lookups, rollbacks, restores and purges refuse with the same message.
* Once you update the part it names, Oasis connects, sends the waiting edits, and everything works again. A Packs Server update needs no restart of your Minecraft server.

## Going back to an older version

An update doesn’t convert your history. A newer version reads what older versions saved as it is, so you can go back as long as the newer version saved nothing the older one can’t read.

If it did, the older version refuses instead of guessing. It changes nothing, and its message names the version that saved the data and what that version added. Put that version back, or a newer one.

| What you went back on   | What happens                                                                                                                                                                                           |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Oasis on Packs Embedded | Oasis doesn’t start logging, and leaves your history alone. The console names the Oasis version to install.                                                                                            |
| Packs Server            | Packs Server doesn’t open that history, and Oasis stops logging until Packs Server can read it. The message names the Packs Server version to install.                                                 |
| A world                 | If a newer Oasis saved something new into a world, an older Oasis doesn’t roll back or restore in that world. Lookups still work, and the other worlds work as usual. `/oasis status` lists the world. |

Before a big jump

To be able to go back after you update across many versions, first copy `plugins/Oasis/store` (Packs Embedded) or `/var/lib/packs` (Packs Server) while it is stopped. The copy works with your old version whatever the new one saves.

## Updating Minecraft

One Oasis jar covers every Minecraft version on the [install page](/docs/install/#1-what-you-need). When you update Paper to a newer Minecraft version, update Oasis first if your Oasis doesn’t list that version yet.

Packs Server writes chunks directly for the fastest rollbacks. If Packs Server is older than your Minecraft version, those rollbacks run at normal speed until you update Packs Server. The result is the same.
