View Single Post
  #1 (permalink)  
Old 11-26-2008, 11:47 PM
amanuensis amanuensis is offline
Junior Member
User
 
Join Date: Nov 2008
OS: Debian
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
amanuensis is on a distinguished road
Default shell script and cron -zipping a folder then archiving on same server

I am wanting to set up a shell script on my Linux server for a cron to run

I have a folder/directory structure

events
fonts
marketing
admin

and within 2 of those folders (events and marketing) there are 60 folders in one and also 60 folder in the other, within those folders are a collection of files and folders.

What I am wanting to do is have a script copy, zip and then save itself to another designated area on the server, sort of like an archive. This has to happen to all the 60 folders in events and also in the marketing folder, it needs to be carried out once a week and also after the first time it has run it has to either write over or replace the previous file from the week before, the one that was saved originally in the designated area.
To summaries, I want to end up with the 60 folders in each of the marketing and events folders, zipped into 60 individual folders in a different location on the same server.
Hope this all makes sense.

If we were taking about just one folder with lots of files and folder inside of it - I am wanting to zip that folder with its contents save it elsewhere on the server - the original must stay where it is and uncompressed.

Any idea anyone.

Thanks in advance for any help with this
Reply With Quote