Professional Documents
Culture Documents
How To Create A Snapshot Retention Policy in Clustered Data ONTAP Using The CLI
How To Create A Snapshot Retention Policy in Clustered Data ONTAP Using The CLI
How To Create A Snapshot Retention Policy in Clustered Data ONTAP Using The CLI
https://kb.netapp.com/onprem/ontap/os/How_to_create_a_snapshot_retention_policy_in_clustered_Dat…
Updated: Wed, 27 Sep 2023 18:33:01 GMT
Applies to
• Clustered Data ONTAP
• ONTAP 9
• Snapshot Policy
Description
This article describes the procedure that should be followed to create a retention policy for automatically
triggered snapshots in clustered Data ONTAP using the CLI.
'NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations
provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations
provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or 1
techniques herein is a customers responsibility and depends on the customers ability to evaluate and integrate them into the customers operational
environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this
document.'
Procedure
Perform the following steps to create a retention policy for automatically generated snapshots from the system
CLI:
Example:
job schedule cron create -name dailySnap -hour 23 -minute 0 (creates a schedule
that will be run every day at 11 p.m)
job schedule cron create -name weeklySnap -dayofweek Sunday -minute
0 (creates a schedule that will be run every Sunday)
For more information on creating a cron schedule , see the job schedule cron create manual.
Example:
For more information on creating a snapshot policy, see the volume snapshot policy create manual.
Example:
volume modify -volume volName -vserver vserverName -snapshot-policy
2days2weeks
Volume volName now has a snapshot policy that will retain only two daily snapshots and two weekly
snapshots.
Additional Information
• Creating schedules using System Manager
© 2023 NetApp.No part of this document covered by copyright may be reproduced in any form or by any means—graphic, electronic, or mechanical,
including photocopying, recording, taping, or storage in an electronic retrieval system—without prior written permission of the copyright owner. For more
information, see Legal Notices. 2
• Creating Snapshot policies using System Manager
© 2023 NetApp.No part of this document covered by copyright may be reproduced in any form or by any means—graphic, electronic, or mechanical,
including photocopying, recording, taping, or storage in an electronic retrieval system—without prior written permission of the copyright owner. For more
information, see Legal Notices. 3