# Backups

### What Makes Us Different?

Ember Host uses something called Borg backups, which has some huge benefits over the S3 backup system that comes with Pterodactyl by default: de-duplicated and incremental backups. This means that each individual backup taken will only include changes since the last backup - hugely decreasing the amount of time backups take after the first one is created.

### Creating a Backup

Here's how to make a backup - start by heading over to the backups tab on our [panel](https://panel.ember.host), and click `Create Backup`.

<figure><img src="https://4084758248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGcHR5Aks7PzvZEX7RVwh%2Fuploads%2FyMU2uWiwcMGHfUsYXib8%2Fcreate1.png?alt=media&#x26;token=fdf1aa5c-36dd-482d-bc45-b121356b5b62" alt=""><figcaption><p>Ember Panel - Backups tab</p></figcaption></figure>

<figure><img src="https://4084758248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGcHR5Aks7PzvZEX7RVwh%2Fuploads%2F7zTe3IV1s6ZmeboUdIZq%2Fcreate2.png?alt=media&#x26;token=feb6aa42-3b8c-4afe-9a17-f84e971c83fc" alt=""><figcaption><p>Name your backup, lock it, or select which files to include here!</p></figcaption></figure>

{% hint style="warning" %}
Selecting files to include here will override the existing `backupPattern.lst`
{% endhint %}

### Creating Scheduled Backups

Schduled backups are simple - you can use our inbuilt schedules feature in our panel, which allows for automated backup creation at whatever times you specify. When you reach the backup limited, the oldest non-locked backup will be deleted to make space for the new one the schedule creates. Curious on how to create a schedule? Check out our page on [schedules](https://docs.ember.host/ember-panel/schedules)!

### Choosing Which Files Are Included in a Scheduled Backup

Go into the files tab of the panel. Then, click 'New File' -> type up your patternfile -> save it as `backupPattern.lst`

```p
- ./backups/**
- ./bluemap/web/maps/**/tiles/**
- ./dynmap/web/tiles/**
- ./crash-reports/**
- ./logs/**
```

*For Borg, lines in a pattern file start with + for include patterns and - for exclude patterns.* `- ./backups/**` tells Borg to exclude the backups directory and all its contents. The \*\* pattern matches any files and subdirectories recursively.

`- ./bluemap/web/maps/**/tiles/**` excludes all tiles directories under any directory within ./bluemap/web/maps/, including their contents.

`- ./dynmap/web/tiles/**` excludes all content within the ./dynmap/web/tiles/ directory, recursively.

`- ./crash-reports/** and - ./logs/**` exclude the crash-reports and logs directories respectively, along with all their contents.

<figure><img src="https://4084758248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGcHR5Aks7PzvZEX7RVwh%2Fuploads%2FuQ6drD9nIjbYke3s097V%2Fcreatingfile.png?alt=media&#x26;token=be2fe52e-2693-42f8-82ce-988b774c6acb" alt=""><figcaption><p>Ember Panel Files tab - new file</p></figcaption></figure>

<figure><img src="https://4084758248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGcHR5Aks7PzvZEX7RVwh%2Fuploads%2FDrQGQQnkUB6N3tHttNF0%2Fwritingfile.png?alt=media&#x26;token=0fad6036-1b41-4f1c-a2f8-813b564ad639" alt=""><figcaption><p>Typing up the example patternfile</p></figcaption></figure>

<figure><img src="https://4084758248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGcHR5Aks7PzvZEX7RVwh%2Fuploads%2FVXUtovYBMqbEUGb8noz5%2Fsavingfile.png?alt=media&#x26;token=aed53850-8653-44ec-9862-446b3bd2a893" alt=""><figcaption><p>Saving the patternfile</p></figcaption></figure>

### Further Examples

To include a specific directory and all its contents: `+ /path/to/directory/**`

To exclude a specific directory: `- /path/to/directory/**`

To include all .yml files in a specific directory: `+ /path/to/directory/**/*.yml`

To exclude all .log files: `- *.log`

By `@goldenedit` and `@icewaffles`
