Bash script to copy files from one server to another (same network)

  • Posted:
  • Closed for Proposals
  • Remote
  • #104401
David S.Martin F.Long N.Dan F.MuthuSankaraNarayanan V. + 3 others have already sent a proposal.
David S.
Database Developer Consultant / Web & Graphic Design
United Kingdom Gravesend
Martin F.
Software Engineer
United Kingdom Curpar
Long N.
The Missing Corner Studio
Vietnam Ha Noi
Dan F.
at HSBC plc
United Kingdom London
MuthuSankaraNarayanan V.
Principal Software Engineer
Denmark Copenhagen
David E.
Software Developer
Top Seller of August 2012
United Kingdom Manchester
Arran G.
Freelance Systems Administrator
United Kingdom Blackpool
Ashish M.
Software Engineer/Freelancer with more than 5 years of experience
United Kingdom Maidenhead
  • 2

Description

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.

[sample folders]
full-20111116.190100.082
full-20111118.190039.864
full-20111120.180004.979
incr-20111115.190013.081
incr-20111116.190008.131
incr-20111117.190007.984
incr-20111118.190010.132
incr-20111119.190010.663
incr-20111121.190008.858

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.

Clarification Board

There are no public clarification questions.
our policy