Skip to content
SHC Docs

shc retention

Retention is a top-level command (shc retention), not a subcommand of backup.

Show the current retention policy:

Terminal window
shc retention
shc retention --stack myapp

Set retention policy:

Terminal window
shc retention set --daily 7 --weekly 4 --monthly 12
shc retention set --stack myapp --daily 30
shc retention set --yearly 5

Apply retention policy (delete excess backups):

Terminal window
shc retention apply
shc retention apply --stack myapp
shc retention apply --yes