I've been tasked with pulling the oldest backup info for our clients. Problem is I have over 2000 clients and I have some clients that I started backing up in 2009, some in 2010, and so on. Other than pulling a mminfo -q CLIENTNAME is there a more efficient way to find the oldest backup for a client? I don't want to delete the oldest backup, I just want to find it.
Bingo - I had thought about that, but the only thing is that I have clients that I setup as late as a few days ago and as early as 2009. So I would have to expand my query to be something like ......"savetime<10/2/2014"..... I didn't know what type of hit that would give the database to pull all of that data for all of those clients while backups, cloning, and restores are running.. Thank you.
Hrvoje - I'm trying that command now, and it's giving me back info. I didn't think about running the "head" command against my output to limit what it gives back. One thing that I did add to it was client to the output that it gives. Thank you.
I guess my main concern is if there was a way to only pull the oldest backup without querying for any other backup data. Something like:
Cool, I didn't know you could do a range. I have the query running now, it's taking a long time for it to finish, but nothing's gone down yet so I'll let it continue..
ble1
6 Operator
•
14354 Posts
•
56186 Points
532
0
Posted October 2nd, 2014 06:00
List of clients (unless someome removed index folder) is in /nsr/index... so what you can do is
for client in `ls -1 /nsr/index`; do mminfo -avot -q client=$client -r 'name,savetime(20),level,group,pool,volume' | head -30 >> /tmp/foo;done
Above I limited output per client to first 30 lines so feel free to adjust it anyway you like.