Data Backup and Recovery

Problem on snashot retention

f_duranti
3,804 Views

Hi, today I got a message saying that the snapshot cannot be deleted because the retention period did not pass. Probably is my bad understanding of the option.

I would like to have a full week of daily snapshot (7)

The setup is done in this way:

SNAP_TIMESTAMP_ONLY=Y

NTAP_SNAPSHOT_RETENTIONS=daily:7

NTAP_SNAPSHOT_RETENTION_AGE=7

NTAP_SNAPSHOT_NODELETE=N

NTAP_SNAPSHOT_DELETE_BY_AGE_ONLY=N

This is the error I get:

########## Running NetApp Snapshot Delete on Primary itnapfs20 ##########

[Sat Aug 20 05:04:26 2011] WARN: WARN: More than 7 snapshots exist (1) but they could not be deleted because they are not older than the retention age (7 days) for itnapfs20:QSR_Data

[Sat Aug 20 05:04:26 2011] DEBUG: Loaded Config File /opt/SnapCreator/scServer3.4.0/configs/SAP_SRM/itnapspv02.conf Successfully

[Sat Aug 20 05:04:26 2011] INFO: Sending Alert to external system [/bin/mailx  -s "SNAPCREATOR WARN: More than 7 snapshots exist (1) but they could not be deleted because they are not older than the retention age (7 days) for itnapfs20:QSR_Data (Config: itnapspv02 Name: BCK Policy: daily)" fduranti@q8.it aguidoni@q8.it balbano@q8.it </dev/null]

[Sat Aug 20 05:04:26 2011] DEBUG: Command [/bin/mailx  -s "SNAPCREATOR WARN: More than 7 snapshots exist (1) but they could not be deleted because they are not older than the retention age (7 days) for itnapfs20:QSR_Data (Config: itnapspv02 Name: BCK Policy: daily)" fduranti@q8.it aguidoni@q8.it balbano@q8.it </dev/null] finished with

exit code: [0]

stdout: [Null message body; hope that's ok]

stderr: []

[Sat Aug 20 05:04:26 2011] INFO: Sending Alert to external system [/bin/mailx  -s "SNAPCREATOR WARN: More than 7 snapshots exist (1) but they could not be deleted because they are not older than the retention age (7 days) for itnapfs20:QSR_Data (Config: itnapspv02 Name: BCK Policy: daily)" fduranti@q8.it aguidoni@q8.it balbano@q8.it </dev/null] finished successfully

[Sat Aug 20 05:04:26 2011] DEBUG: Loaded Config File /opt/SnapCreator/scServer3.4.0/configs/SAP_SRM/itnapspv02.conf Successfully

[Sat Aug 20 05:04:26 2011] INFO: Creating OM Event (script:warning-event) on itromlx13

[Sat Aug 20 05:04:26 2011] DEBUG: ZAPI REQUEST

<event-generate>

    <event-name>script:warning-event</event-name>

    <source>1</source>

    <event-message>SNAPCREATOR WARN: More than 7 snapshots exist (1) but they could not be deleted because they are not older than the retention age (7 days) for itnapfs20:QSR_Data (Config: itnapspv02 Name: BCK Policy: daily)</event-message>

</event-generate>

[Sat Aug 20 05:04:26 2011] DEBUG: ZAPI RESULT

<results status="passed"></results>

This is the list of the snapshot:

########## NetApp Snap Creator Framework Snapshot (Primary) List for itnapfs20:QSR_Data #########

### Snapshot Name ###                           ### Snapshot Timestamp ###

BCK-daily_20110813050002                                Aug 13 2011 05:00:21

BCK-daily_20110814050002                                Aug 14 2011 05:00:24

BCK-daily_20110815050001                                Aug 15 2011 05:00:26

BCK-daily_20110816050001                                Aug 16 2011 05:00:24

BCK-daily_20110817050001                                Aug 17 2011 05:00:25

BCK-daily_20110818050002                                Aug 18 2011 05:00:26

BCK-daily_20110819050002                                Aug 19 2011 05:00:21

BCK-daily_20110820050002                                Aug 20 2011 05:00:23

I was expecting that the backup of 13 august will be deleted... Am I doing something wrong?

Should I put NTAP_SNAPSHOT_RETENTION_AGE=6 instead of 7 ?

What about this? NTAP_SNAPSHOT_DELETE_BY_AGE_ONLY=N Should I set the option to "Y" to have the snapshot deleted only by date?

Thanks

Francesco

1 ACCEPTED SOLUTION

ktenzer
3,804 Views

NTAP_SNAPSHOT_RETENTION_AGE=7 means snapshot willbe deleted according to number of snapshots and age, both need to be satisfied. The timestamp for snapshot comes from filer not host so it must be off, SC uses epoch time so it is exact according to what filer tells us for given snapshot.

To be sure you can set NTAP_SNAPSHOT_RETENTION_AGE=6.9 this covers you if SC is to quick for some reason by few seconds.

NTAP_SNAPSHOT_DELETE_BY_AGE=Y means SC doesnt look at number of snapshots and only deletes by age.

Regards,

Keith

View solution in original post

3 REPLIES 3

ktenzer
3,805 Views

NTAP_SNAPSHOT_RETENTION_AGE=7 means snapshot willbe deleted according to number of snapshots and age, both need to be satisfied. The timestamp for snapshot comes from filer not host so it must be off, SC uses epoch time so it is exact according to what filer tells us for given snapshot.

To be sure you can set NTAP_SNAPSHOT_RETENTION_AGE=6.9 this covers you if SC is to quick for some reason by few seconds.

NTAP_SNAPSHOT_DELETE_BY_AGE=Y means SC doesnt look at number of snapshots and only deletes by age.

Regards,

Keith

f_duranti
3,804 Views

Thanks Keith as usual you're answer are really useful. I was thinking that numeric parameters was only integer. Just to clarify better the various snap delete options, I have those opportunity:

1) If I don't want to check for time and delete snapshot only for number in the policy I can put "NTAP_SNAPSHOT_RETENTION_AGE= " and "NTAP_SNAPSHOT_DELETE_BY_AGE=N"

2) If I want only to delete by time only (don't check on policy number) I can put NTAP_SNAPSHOT_RETENTION_AGE=xx and NTAP_SNAPSHOT_DELETE_BY_AGE=Y (it will delete snapshot also if they'll be less that the number defined in the policy?)

How many decimal can I use in the NTAP_SNAPSHOT_RETENTION_AGE number? With 1 decimal I can get to 2.4 hours every ".1" .. is this right?


One last question on snapshot removal.

All the option will refer to the currently used policy Is this right? NTAP_SNAPSHOT_RETENTION_AGE= and NTAP_SNAPSHOT_DELETE_BY_AGE= are global for all the policy used in a config files while the real policy daily:x,weekly:y, hourly:z are used for the single policy so in case I've a configuration where I have all of the three policy used I should normally put "NTAP_SNAPSHOT_RETENTION_AGE=" (so that it will not check on time or it will probably not delete hourly snapshot) and then when i run a --policy daily it will do the daily snapshot and delete the old daily snapshot and the same for the hourly and weekly.. is this right? (Don't know if the question is clear sorry for the bad exposition )

Francesco

ktenzer
3,804 Views

Yep you got it on points 1 and 2.

Every .1 of retention age would equal 2.4 hours we convert to seconds

Regards,

Keith

Public