This macro will back up all the tex files in your mainfile directory (incl. subdirectories). The backup macro is triggered each time you save a file or compile the project but will be executed only if the last backup is older than 5 minutes. A secondary backup is also performed where all of the files are backed up regardless of their file extension, but this "big" backup is performed at most only once a week.
The minimal age of both backup-methods can be easily adjusted to your needs at the beginning of the macro file.
In the folder of your main file a new folder will be created by the name "Backup". In there you will find the continuous backup folder and the complete backup folder. The archive files in these folders are named after the date and time of their creation. There will be also two files by the name "last", do not delete them as the time of the last backup is saved in those files.
Note: After many hours of trial and error I found the best settings for 7-zip to generate the smallest file sizes possible. These settings vary for the continuous and the complete backups.
7-zip must be installed (from www.7-zip.org)
Macro contributed by U-Jean <ygn2kgmx.net>