aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/md/Backup-and-restore.md
blob: e7e2775c6891c914d10a90c7106366e0b7690e65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
## Backup and restore

All data and [configuration](Shaarli-configuration.md) is kept in the `data` directory. Backup this directory: 

```bash
rsync -avzP my.server.com:/var/www/shaarli.mydomain.org/data ~/backups/shaarli-data-$(date +%Y-%m-%d_%H%M)
```

It is strongly recommended to do periodic, automatic backups to a seperate machine. You can automate the command above using a cron job or full-featured backup solutions such as [rsnapshot](https://rsnapshot.org/)

To restore a backup, simply put back the `data/` directory in place, owerwriting any existing files.