DIRVISH-EXPIRE(8)

πŸ’– DIRVISH-EXPIRE πŸ’–

okay bestie, sit down, hydrate, and let me tell you about dirvish-expire from the System Manager's Manual section (section 8, for the sysadmin girlies ✨). this is the little tool that goes through your dirvish vaults and yeets the expired images. no cap.


🌸 NAME 🌸

dirvish-expire β€” delete expired dirvish images πŸ—‘οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

dirvish-expire[OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does is delete dirvish image trees, or whole images, that have expired. like, their time is up, they had their moment, we love them, bye πŸ’…

every image has a summary file, and dirvish-expire checks each one for the Expire: field. if that field says the image has expired, then dirvish-expire will delete that image out of the vault. periodt.

by default, all subdirectories of all banks get treated as vaults, and everything inside them β€” except the directory literally named dirvish β€” gets checked for summary files. so it's thorough. it's giving thorough.

the removal of one image will have no effect on the other images. they don't gossip, they don't take it personally. 🫢

here's the safety girlie behaviour though, and this part is important: dirvish-expire will NOT delete an image unless it finds at least one image in that branch that has an <strong>intact image tree</strong> and Status: success in the summary that is <strong>not expired</strong>. so it never leaves you with nothing. it checks the vibe first. πŸ”₯


✨ OPTIONS ✨

general rules first, bestie, because they apply to everything below:

  • each option on the command line may be specified <strong>any number of times</strong>.
  • those options that support lists in the config files will <strong>accumulate</strong> all of their arguments β€” otherwise each specification will <strong>override</strong> the ones before it. (so sometimes it stacks, sometimes it replaces. iykyk.)
  • each option may be <strong>unambiguously abbreviated</strong>. you can be lazy, just not ambiguous about it. 😌

now the actual options:

  • --time time_expression β€” execute as though time_expression were the current time. ⏰

time_expression is processed by Time::Parsedate(3pm), so relative time and date strings are permitted. see Time::Parsedate(3pm) for more details.

  • --tree β€” only delete the image tree. leave in place the rest of the image directory with summary, log and any other image administrative files. 🌳 so the tree goes, the paperwork stays.
  • --vault vault β€” restrict expiration to the specified vault. 🏦 one vault only, main character energy.
  • --no-run β€” don't actually do anything. just display what <strong>would have</strong> happened. πŸ‘€ the ultimate dry run, the "not me, I'm just watching" of flags.
  • --quiet β€” run quietly, only report errors. 🀫

normally dirvish-expire will report the images deleted. with this, it won't. silence is golden.


πŸ’€ EXIT CODES πŸ’€

to facilitate further automation and integration of dirvish-expire with other tools, dirvish-expire provides rationalised exit codes. the exit codes are <strong>range based</strong>. while the code for a specific error may change from one version to another, it will remain within the specified range. so don't test for specific exit codes β€” instead test for a <strong>range</strong> of values. to the degree possible, higher value ranges indicate more severe errors. πŸ“ˆ

  • 0 β€” success πŸŽ‰
  • 200-219 β€” an error was encountered in loading a configuration file. 😭
  • 220-254 β€” an error was detected in the configuration. πŸ™ˆ
  • 255 β€” incorrect usage. πŸ’€

πŸ“ FILES πŸ“

  • /etc/dirvish/master.conf β€” alternate master configuration file.
  • /etc/dirvish.conf β€” master configuration file.
  • bank/vault/image/summary β€” image creation summary.
  • bank/vault/image/tree β€” actual image of source directory tree.

🌈 SEE ALSO 🌈


🧚 BUGS 🧚

dirvish-expire will walk the file hierarchy of <strong>all banks</strong> or the <strong>specified vault</strong> looking for summary files. anything non-dirvish in there may cause excess file-walking. πŸšΆβ€β™€οΈπŸšΆβ€β™€οΈπŸšΆβ€β™€οΈ so like, keep your vaults clean, bestie. don't put your random stuff in there and then act surprised.


and that's the whole page, gorgeous πŸ’œ that was DIRVISH-EXPIRE(8) from the System Manager's Manual, and yes, the footer says the exact same thing β€” DIRVISH-EXPIRE(8) β€” so we've come full circle, iconic, no notes. go forth and expire responsibly πŸŽ€βœ¨