blob: dd57804713b7af05b7667080db67b201de403cd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
---
title: "Backups"
date: 2023-01-17T19:38:39-03:00
draft: false
weight: 3
summary: Backup your YAMS configuration.
---
Your YAMS configuration is located in your YAMS install directory.
## Create a backup
For the purposes of this tutorial, I'll assume your YAMS install directory is `/opt/yams`, and that you want to create a backup on your `~` directory.
First, go to the YAMS install directory and do a `ls`. You should see the `config` folder right there:
```bash
$ cd /opt/yams/
/opt/yams$ ls
# Output
config docker-compose.yaml
```
To create a backup, just run:
```bash
/opt/yams/config$ tar -czvf ~/yams-backup.tar.gz config/*
```
`tar` is going to compress and create a `.tar.gz` file called `yams-backup.tar.gz` on the `~` directory.
Remember you should store your backups in a secure location!
## Restore a backup
For the purposes of this tutorial, I'll assume your YAMS install directory is `/opt/yams`, and that the backup is located in `~/yams-backup.tar.gz`.
To restore a backup, first stop YAMS:
```bash
$ yams stop
```
Then, go to your YAMS install directory and delete everything inside the `config` folder.
```bash
$ cd /opt/yams
/opt/yams$ rm -r config/*
```
Now, untar the backup file on your YAMS install directory.
```bash
/opt/yams$ tar -xzvf ~/yams-backup.tar.gz
```
If you see all the folders inside the `config` directory, it means it worked!
```bash
/opt/yams$ ls config
# Output
bazarr emby gluetun jackett qbittorrent radarr sonarr
```
Finally, restart YAMS
```bash
/opt/yams$ yams start
```
Everything should be running as expected, with your backup up and running!
|