VMware Cloud Community
Byron_Zhao
Enthusiast
Enthusiast

How long it takes to purge old data in vCenter's database

Our vCenter's database has grown to 170GB over the past one and half years, so we decided to purge some old data. We are using the script from KB 1000125, and keep 30 days of data. It has been running for 17 hours, and still not done yet. Does anyone know how long normally it takes?

I know, the KB has a warning there saying it will take a very long time to run in a large database. But, how large is large? and how long is long?

BZ

Reply
0 Kudos
5 Replies
Troy_Clavell
Immortal
Immortal

That is a huge DB, WOW! I would continue to let it run, you may be nearing the end. Purging anything older than 30 days, and having the DB online for a year and a half may take some time.

You can have your vCenter Server down for 14 days and not lose anything. The only feature you will not have is DRS, but HA will continue to work.

Just be patient......and maybe think about changing your recovery mode to simple?

Reply
0 Kudos
Byron_Zhao
Enthusiast
Enthusiast

It is almost 20 hours now.

I know ESX and VM can run without VC, and HA still functions too. I really want to know if it is close to the end of purging.

Can anyone who used this script give me an idea how long it takes to purge how many rows, or how many GB of data?

Thanks

BZ

Reply
0 Kudos
Byron_Zhao
Enthusiast
Enthusiast

Now it has been running 24 hours and still running.

thinking about stopping it and restoring it...

Reply
0 Kudos
andersonch
Contributor
Contributor

Did you stop the script of let it run? I have a 4GB DB and I am on hour 19.

Reply
0 Kudos
Byron_Zhao
Enthusiast
Enthusiast

Yes, I did. After restoring the DB, we decided to purge 60 days of logs each time. I am not sure how long exactly it takes to get it down to 30 days of logs, since we started it up in the evening, and checked it the next morning. The DBA told me sometimes it took less than 5 minutes to get it done. It is a much easy process to use the script again a small chuck of this DB.

That means if you are running 19 hours on a 4 GB DB, you should stop it.

Reply
0 Kudos