Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

If you are going write a set of program to housekeep the production data, how can you ensure your program will work correctly?

We cannot housekeep the data based on their creation time. We would delete the data only if it has a generation date older than 6 months. But the generation date is not equal to the timestamp of the file, instead we query the database for relavent generation date.

If we implement a logic to compare the generation date and today's date, who can be sure of the logic won't fail on some special occasion? Maybe I am expressing too much concern over this, but when it comes to delete of production data, one needs to be cautious.

share|improve this question

1 Answer 1

  1. For your program - Test, test, test

  2. Always make sure that you backup your database before carrying out housekeeping tasks

  3. If possible instead of deleting the data completely, move it to archive tables so that it is always available.

share|improve this answer
    
this is the answer. Analyse the requirments for the data cleanup, test your procedures thoroughly, backup before you run in live. –  Ozz Mar 7 '12 at 9:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.