backup.md 864 Bytes
Newer Older
les's avatar
les committed
1
2
3
---
layout: default
title: Backup
les's avatar
les committed
4
permalink: /install/backup
les's avatar
les committed
5
6
7
8
9
10
11
nav_order: 5
parent: Install
---

## Backup

The following commands should be valid for every setup (docker/debian/sqlite/postgres) but check your installation directory first.
les's avatar
les committed
12
This includes database, configuration, custom user locales, logs, images and thumbnails.
les's avatar
les committed
13
14
15
16
17
18
19

```bash
cd /opt/gancio/ # or /home/gancio or where your installation is
tar  -czf gancio-$(date +%Y-%m-%d-%H%M%S)-backup.tgz  \
  $(ls -d config.json uploads user_locale db.sqlite postgres data logs 2> /dev/null)
```
> warning "Permission denied"
les's avatar
minor    
les committed
20
> `postgres` directory could have different permission or owner, in this case you need to be root or use `sudo` instead.
les's avatar
les committed
21
22
23

> info "Automatic backup"
> To periodically backup your data you should probably use something like [restic](https://restic.net) or [borg](https://www.borgbackup.org/)