Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

2340

March 20th, 2018 12:00

Avamar expire-snapups

Hello, I was looking for some help on the expire-snapups script.

I successfully run the following command:

expire-snapups --domain=/DOMAINPATH/ContainerClients --after='2016-05-01' --before='30 days ago' --days=90 /DOMAINPATH/ContainerClients/EFD-V-1016

It flags all my backups older than 30 days from now as MODIFY which is what I was looking for.  My issue is when I run the script that gets created i'm getting "expiration New expiration date is before current date" for anything that is older than 90 days.

I was hoping it would just expire all the old backups and when the clean ran it would see that they are old and delete them on their own.  but it seems to have an issue with expiring something before today's date.  Do I actually have to run the delete-snapups script then or is there something i'm doing wrong.  I was hoping Avamar would do all the heavy lifting so DataDomain would be cleaned up correctly.

Thoughts?

2K Posts

March 21st, 2018 06:00

In that case, I think you might need to do this in two passes, i.e. use delete-snapups with --after='2016-05-01' --before='90 days ago' and use modify-snapups for the rest.


My pleasure!

2 Posts

March 20th, 2018 13:00

So here is a snippet from my script

# MODIFY    Snapup date: 2017-12-01 19:14:33 CST   Lab#: 495     Replicated: N/A

echo running : "mccli backup edit --domain=/prov-cu-vc1.health.hin.sk.ca/ContainerClients --name=EFD-V-1016_UAj7SzrvE3Ihp6vsxSnN2Q  --labelNum=495 --created=2017-12-01 --expiration=2018-03-01"

mccli backup edit --domain=/DOMAINPATH/ContainerClients --name=EFD-V-1016_UAj7SzrvE3Ihp6vsxSnN2Q  --labelNum=495 --created=2017-12-01 --expiration=2018-03-01

and here is the output when I run it:

running : mccli backup edit --domain=/DOMAINPATH/ContainerClients --name=EFD-V-1016_UAj7SzrvE3Ihp6vsxSnN2Q  --labelNum=495 --created=2017-12-01 --expiration=2018-03-01

1,23005,Invalid retention policy specification or name specified on the CLI.

Attribute  Value

---------- -------------------------------------------

expiration New expiration date is before current date.

so since the expiration is set to a date older than today it's complaining, i'd like to override this and just have avamar delete the backup next clean.

Thanks for replying btw

2K Posts

March 20th, 2018 13:00

Running the expire-snapups script produces an output script that can make the requested changes. This is for safety reasons as it will allow you to review the commands in the output script and confirm they are correct before executing the changes. A typo when running a mass expire could accidentally remove significant amounts of data. You have to redirect the output of expire-snapups to a file, review the output for correctness, then mark it executable and run it. Normally I recommend running the output script like this:

nohup scriptname &

This detaches the script from the console so it will continue to run even if your SSH session gets disconnected.

KB 333438 has a full set of instructions for using expire-snapups:

https://support.emc.com/kb/333438

No Events found!

Top