Bash script to copy files from one server to another (same network)
Closed for Proposals
I need a bash script writing that will do the following:
Email Server (192.168.0.9) - Ubuntu
File Server (192.168.0.20) - Freenas/FreeBSD
Backup files are store on the email server at location: /opt/email/backup/sessions
Storage folder is: /mnt/Data/BACKUPS/email
There are approx 100GB of files split over multiple folders as shown below. The incr folders are small, the majority of the full folders are small, with one that is 100GB.
I need the script (i will set a cronjob up for this) to rsync all of these NEW files/folders over to the storage server.
It will need to check if any of these files are older than a certain period(i want to be able to edit the script and change the number of days if I want) and delete the ones that are.
There are no public clarification questions.