diff --git a/README.md b/README.md index 281b8bf..7bada75 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ ``` +# General + RAD (recursive after date) is a bash script for keeping two big folders in sync fast. This is archieved by only copying the last changes after a certain date. Originally it was created to keep a Nextcloud Twin in sync to a @@ -22,3 +24,38 @@ This can be achieved by the command: ``` sudo -u www-data /var/www/nextcloud/occ decks:export > /var/www/nextcloud/data//files ``` + + + +# Usage + +Go to the folder containing the folder that you want to backup. + +For example, to backup /var/www/nextcloud/data, do + +``` +cd /var/www/nextcloud +``` + +Then create the backupfolder and go into it +``` +mkdir data-backup +cd data-backup +``` + +Now you should be in +``` +/var/www/nextcloud/data-backup +``` +whereas the data folder should be in the same dir as data-backup +``` +/var/www/nextcloud/data +``` + +Now change the variables accordingly in the extract and inject script. + +The extract script will create a copy of data and its subdirs, if they +contain data after the date specified. + +After that, the inject script will copy to folder specified in the script. +