X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/c0c07664edd370d5385dc1eb44174bed1e5ecbbe..4ebd66852717046203f8d56cd492422c4bf7ff48:/README.md?ds=sidebyside 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*.