From: DecaTec Date: Wed, 4 Jul 2018 16:12:06 +0000 (+0200) Subject: Notes for 4 byte support (DB) and external storage; updated links; typos X-Git-Tag: v1.0.0~19 X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/commitdiff_plain/c255038f93ab4dae3a2733be5449d1dd7a5d3321?ds=sidebyside Notes for 4 byte support (DB) and external storage; updated links; typos --- diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index 6f09159..6cb6b0e 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -4,7 +4,7 @@ # Bash script for creating backups of Nextcloud. # Usage: ./NextcloudBackup.sh # -# The script is based on an installation of Nextcloud using nginx and MariaDB, see https://decatec.de/home-server/nextcloud-auf-ubuntu-server-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/ +# The script is based on an installation of Nextcloud using nginx and MariaDB, see https://decatec.de/home-server/nextcloud-auf-ubuntu-server-18-04-lts-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/ # # diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index faad960..a2fa3d2 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -4,7 +4,7 @@ # Bash script for restoring backups of Nextcloud. # Usage: ./NextcloudRestore.sh (e.g. ./NextcloudRestore.sh 20170910_132703) # -# The script is based on an installation of Nextcloud using nginx and MariaDB, see https://decatec.de/home-server/nextcloud-auf-ubuntu-server-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/ +# The script is based on an installation of Nextcloud using nginx and MariaDB, see https://decatec.de/home-server/nextcloud-auf-ubuntu-server-18-04-lts-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/ # # diff --git a/README.md b/README.md index 3892461..36f0394 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This repository contains two bash scripts for backup/restore of [Nextcloud](https://nextcloud.com/). -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/)). +It is based on a Nextcloud installation using nginx and MariaDB (see the (German) tutorial [Nextcloud auf Ubuntu Server 18.04 LTS mit nginx, MariaDB, PHP, Let’s Encrypt, Redis und Fail2ban](https://decatec.de/home-server/nextcloud-auf-ubuntu-server-18-04-lts-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/)). ## General information @@ -18,13 +18,15 @@ The scripts take care of these three items to backup automatically. - After cloning or downloading the repository, you'll have to edit the scripts so that they represent your current Nextcloud installation (directories, users, etc.). All values which need to be customized are marked with *TODO* in the script's comments. - The scripts assume that Nextcloud's data directory is *not* a subdirectory of the Nextcloud installation (file directory). The general recommendation is that the data directory should not be located somewhere in the web folder of your webserver (usually */var/www/*), but in a different folder (e.g. */var/nextcloud_data*). For more information, see [here](https://docs.nextcloud.com/server/13/admin_manual/installation/installation_wizard.html#data-directory-location-label). - However, if your data directory *is* located under the Nextcloud file directory, you'll have to change the scripts so that the data directory is not part of the backup/restore (otherwise, it would be copied twice). +- The scripts only backup the Nextcloud data directory. If you have any external storage mounted in Nextcloud, these directories have to be handled separately. +- If you have enabled 4 byte support (see [Nextcloud Administration Manual](https://docs.nextcloud.com/server/13/admin_manual/configuration_database/mysql_4byte_support.html)) while backup, you have to enable 4 byte support on the target system *before* restoring the backup. - If you do not want to save the database password in the scripts, remove the variable *dbPassword* and call *mysql* with the *-p* parameter (without password). When calling the scripts manually, you'll be asked for the database password. ## Backup -In oder to create a backup, simplly call the script *NextcloudBackup.sh* on your Nextcloud machine. -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*. +In order to create a backup, simply call the script *NextcloudBackup.sh* on your Nextcloud machine. +This will create a directory with the current time stamp in your main backup directory (you already edited the script so that it fits your Nextcloud installation, haven't you): As an example, this would be */mnt/Share/NextcloudBackups/20170910_132703*. ## Restore -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*. \ No newline at end of file +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). The full command for a restore would be *./NextcloudRestore.sh 20170910_132703*. \ No newline at end of file