]> git.p6c8.net - nextcloud-backup-restore.git/blob - README.md
75eae70259e2369972c7a86080a90f128929de7f
[nextcloud-backup-restore.git] / README.md
1 # Nextcloud-Backup-Restore
2
3 This repository contains two bash scripts for backup/restore of [Nextcloud](https://nextcloud.com/).
4
5 It is based on a Nextcloud installation using nginx and MariaDB (see the (German) tutorial [Nextcloud auf Ubuntu Server mit nginx, MariaDB, PHP, Let’s Encrypt, Redis und Fail2ban](https://decatec.de/home-server/nextcloud-auf-ubuntu-server-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/)).
6
7 ## Usage
8
9 **Important**
10
11 After cloning or downloading the repository, you'll have to edit the scripts so that they represent your current Nextcloud installation (directories, users, etc.)
12
13 ## General information
14
15 For a complete backup of any Nextcloud instance, you'll have to backup three items:
16 - The Nextcloud file directory (usually */var/www/nextcloud*)
17 - The data directory of Nextcloud (it's recommended to locate this not under the web root, so e.g. */var/nextcloud_data*)
18 - The Nextcloud database
19
20 The scripts take care of these three items to backup automatically.
21
22 ### Backup
23
24 In oder to create a backup, simplly call the script *NextcloudBackup.sh* on your Nextcloud machine.
25 This will create a direcotry with the current time stamp in your main backup directory (you already edited the script so that it fits yout Nextcloud installation, haven't you): As an example, this would be */mnt/Share/NextcloudBackups/20170910_132703*.
26
27 ### Restore
28
29 For restore, just call *NextcloudRestore.sh*. This script expects one parameter which is the name of the backup to be restored. In our example, this would be *20170910_132703* (the time stamp of the backup created before). So the full command for a restore would be *./NextcloudRestore.sh 20170910_132703*.

patrick-canterino.de