shell script to backup

Q: script to daily backup all databases in the server, retain only last 4 backps

please anyone give me a reply

This is not a trivial task and I would expect a professional team to spend at least fortnight preparing, implementing and testing a suitable backup process to match your business needs. And that assumes that you already have the right hardware.

As you have given no detail, perhaps you need to see both your DBA and your Systems Administrator first.

Are there any clues as to the OS, database software? How big? What media to write to?

If you are the DBA/SysAdmin, you should know these things. If you are not the DBA/SysAdmin, then this is probably the responsibility of the DBA / SysAdmin.

If you are only one of these roles, then please talk to your counterpart.

Robin
Liverpool/Blackburn
UK

I agree with Rbatte1. See your local experts.

A very common mistake is to just back up every file on a server (including any databases) and then expect to be able to restore a database from the backup. If there is no process to formally stop the database (or do an online database backup) prior to the server backup, the actual backup will be useless.