The short rad stands for "recursive after date".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB

7 months ago
7 months ago
7 months ago
  1. ```
  2. ____ _ ____
  3. | _ \ / \ | _ \
  4. | |_) | / _ \ | | | |
  5. | _ < / ___ \| |_| |
  6. |_| \_\/_/ \_\____/
  7. ```
  8. # General
  9. RAD (recursive after date) is a bash script for keeping two big folders in sync fast.
  10. This is archieved by only copying the last changes after a certain date.
  11. Originally it was created to keep a Nextcloud Twin in sync to a
  12. running Nextcloud Instance, for fast recovery.
  13. When doing that, keep in mind that decks are not stored in data.
  14. You can periodically export the decks data of each user to its data dir.
  15. This can be achieved by the command:
  16. ```
  17. sudo -u www-data /var/www/nextcloud/occ decks:export <user-id> > /var/www/nextcloud/data/<user-id>/files
  18. ```
  19. # Usage
  20. Go to the folder containing the folder that you want to backup.
  21. For example, to backup /var/www/nextcloud/data, do
  22. ```
  23. cd /var/www/nextcloud
  24. ```
  25. Then create the backupfolder and go into it
  26. ```
  27. mkdir data-backup
  28. cd data-backup
  29. ```
  30. Now you should be in
  31. ```
  32. /var/www/nextcloud/data-backup
  33. ```
  34. whereas the data folder should be in the same dir as data-backup
  35. ```
  36. /var/www/nextcloud/data
  37. ```
  38. Now change the variables accordingly in the extract and inject script.
  39. The extract script will create a copy of data and its subdirs, if they
  40. contain data after the date specified.
  41. After that, the inject script will copy to folder specified in the script.