X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/1d14261e98a5f4cfd47dd5d7d445a5e5706dd419..c15f80e37cd9c1a02fb3574d4950570f03d23fc5:/README.md diff --git a/README.md b/README.md index 54681bf..a1f5413 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ In order to create a backup, simply call the script *NextcloudBackup.sh* on your If this script is called without parameter, the backup is saved in a directory with the current time stamp in your main backup directory: As an example, this would be */media/hdd/nextcloud_backup/20170910_132703*. The backup script can also be called with a parameter specifiying the main backup directory, e.g. *./NextcloudBackup.sh /media/hdd/nextcloud_backup*. In this case, the directory specified will be used as main backup directory. +You can also call this script by cron. Example (at 2am every night, with log output): + +`0 2 * * * /path/to/scripts/Nextcloud-Backup-Restore/NextcloudBackup.sh > /path/to/logs/Nextcloud-Backup-$(date +\%Y\%m\%d\%H\%M\%S).log 2>&1` + ## Restore For restore, just call *NextcloudRestore.sh*. This script expects at least one parameter specifying 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*.