shell scripting with directory

I have a directory /ndata/nmk

I want to have 4 copies of my daily database backups like /ndata/nmk/copy1
/ndata/nmk/copy2 till copy4 .

where copy1-copy4 are directories having my db backups .

Once my db backups reach 4 directories like copy4 i want to again write from copy1 to copy4 .

basically i want to keep 4 copies of my db backups at any given time .

I want a script which will at least simulate the directory copy to 4 directories under /ndata/nmk .

This is just renaming the directories after the backups been taken. copy1 is always the latest and copy4 is the oldest.

Jerry

Jerry
This is what I need as part of a automated shell script .

I have a database backup script called eod.sh which backups the database and puts the directory named fullDB_timestamp to directory /ndata/nmk/backup.Its a cron job and creates the directory every midnight.

What I want is to have 4 diff copies of fullDB_timestamp i.e to have 4 consecutive days of backups under /nsdata/nmk .ie copy each days fullDB** under /ndata/nmk/backup to /nsdata/nmk/copy1-4 .On the fifth day it should overwrite the first and so on .

thanks

I admit my solution doesn't do exactly what you want, but it does create 4 backups. Instead of overwriting 1 on the 5th day, 2 on the 6th day...1 again on the 33rd day etc, it simply creates copy1 which is yesterday's, copy2 for 2 days ago, copy3 for 3 days and copy4 for 4 days. copy5 is thrown away.