added usage paragraph to README.md

This commit is contained in:
alpcentaur 2024-03-19 14:41:36 +00:00
parent 2f8ac5b023
commit a4ce9ed5c0

View file

@ -10,6 +10,8 @@
``` ```
# General
RAD (recursive after date) is a bash script for keeping two big folders in sync fast. 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. 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 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 <user-id> > /var/www/nextcloud/data/<user-id>/files sudo -u www-data /var/www/nextcloud/occ decks:export <user-id> > /var/www/nextcloud/data/<user-id>/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.