I need to merge my incremental backups into the secure folder (which is the main backup folder) in order of date.
Someone has helped with the script to rsync the documents each night via a cron job:
$ for f in `ls -t /var/backups`; do rsync -aL "/var/backups/$f" /var/www/live/documents/; done
backup-2011-07-02 backup-2011-06-27 backup-2011-06-22 backup-2011-06-17 backup-2011-07-06 backup-2011-07-01 backup-2011-06-26 backup-2011-06-21 backup-2011-06-16 backup-2011-07-05 backup-2011-06-30 backup-2011-06-25 backup-2011-06-20 backup-2011-06-15 backup-2011-07-04 backup-2011-06-29 backup-2011-06-24 backup-2011-06-19 backup-2011-06-14 backup-2011-07-03 secure backup-2011-06-23 backup-2011-06-18
Example folder structure:
In each of these folders is the folder secure in which are the folders and files that need to be merged
I not sure the best way to write a script to merge all the backups in order of date into the secure folder.