Jump to content

Database archive and purge


This topic is 977 days old. Please don't post here. Open a new topic instead.

Recommended Posts

howdy all,

 

 need ideas on best practice for archiving and purging a database

I have a database with 10 tables all with relationships, and approximately 40K recorded I would like to have a script (or plugin) that would allow me to move data older than 1 year to an identical database and then delete the found set from the master.

I tried using the export import but can't figure out how to move all relevant records including the once from the relation. 

Any help or ideas would be greatly appreciated. 

Thanks

Rudy

Link to comment
Share on other sites

Thank you for your reply,

Data older than 6 months will  never be accessed again, but don't want to delete just in case. My idea was to have a script move any data older then 6 month to another database for save keeping.

Thanks

Rudy

 

Link to comment
Share on other sites

15 hours ago, rudym88 said:

Data older than 6 months will  never be accessed again

So don't access it.

What you ask for requires a considerable amount of very careful scripting. You would need to find records that are older than a year and export them. Then tell the other file to import them. (Or tell the other file to import them directly from the original file.) Then delete them. All this repeated 10 times, once for each table. That's a lot of moving parts - and if anything goes wrong during this process, you will lose data. That's on the con side. On the pro side: nothing, AFAICT.

 

Link to comment
Share on other sites

Thanks, I was hoping to get a better simpler solution.  I started to put something together and you are correct there are a lot of moving parts.

 

Thanks for the the advice.  

Link to comment
Share on other sites

This topic is 977 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.