Skip to content

morgant/43f

Repository files navigation

 ___   ___   _______      _______   ________________________________________
|   | |   | |       \    /       |                                         /
|   | |   | !___     |  |    ____!                                        /
|   !_!   |_  __!    | _!   !__                                          /
|           ||      / |        |                                        /
!_____     _!!__    \ !_     __!                                        \
      |   |  ___!    |  |   |                                            \
      |   | |        |  |   |                                             \
      !___! !_______/   !___!  ____________________________________________\

43f

by Morgan Aldridge morgant@makkintosshu.com

43f on OpenHub Donate

OVERVIEW

43f is a simple date-based storage management utility based on the forty- three folders concept from David Allen's "Getting Things Done" program. It maintains 43 folders per year (one for every month (12) and one for every possible date in a month (31), therefore allowing you to store up to 31 daily file sets, 12 monthly file sets, and as many annual file sets as you would like. It is ideal for managing backup/snapshot sets, but should be flexible enough for any number of uses.

43f has been tested on Mac OS X and Linux, OpenBSD support is in-progress.

NOTE: 43f is a destructive utility (it is designed to manage--and therefore delete--files), so please proceed with caution, have a backup, run the unit tests, and test thoroughly before deploying!

PREREQUISITES

USAGE

43f is intended to be fairly transparent in it's functionality, so once installed & configured (see INSTALLING 43f for details), you need only move files into various day or month directories within your 43f repository. 43f will then manage the storage nightly.

The basic directory structure will be something like the following (not in alphabetical order for greater clarity):

43f/
|-- 2013/
|   |-- d01/
|   |-- d02/
|   |-- ...
|   |-- d30/
|   |-- d31/
|   |-- m01/
|   |-- m02/
|   |-- ...
|   |-- m11/
|   `-- m12/
|-- today/
|-- yesterday/
|-- sunday/
|-- monday/
|-- tuesday/
|-- wednesday/
|-- thursday/
|-- friday/
`-- saturday/

So, you can move (esp. useful when automated) any files into a particular day or month directory (even better, use the today, yesterday, or sunday through monday symlinks, when convenient) and 43f will preserve those within X days, Y months, and Z years worth (as specified in the configuration file). You can always run 43f stats for disk usage details.

Run 43f -h or 43f --help for further usage instructions.

TO-DO

  • Add logging to syslog and/or a file
  • Switch from a config file to a hidden .43f directory and .43f/config file within the repository (like many VCS/SCM implementations use)?
  • Smart advance notifications based on disk usage rates gleaned from stats

CHANGE LOG

See CHANGELOG.md for detailed version history.

ACKNOWLEDGEMENTS

Naturally, I wouldn't have envisioned this without David Allen's "Getting Things Done" program (books & CDs) or the GTD craze sparked in the mid-2000's and further fueled by the likes of Merlin Mann.

The concept and some very early code was collecting dust in a proverbial pile on my hard drive until Small Dog Electronics agreed to sponsor further development for internal use. It may never have seen the light of day otherwise.

Development and troubleshooting was greatly simplified by the use of Rocky Bernstein's bashdb debugger for bash.

Functional tests are implemented using Blake Mizerany's roundup.

NOTE: Since 43f relies so heavily on date calculations, there are some functional tests that will change & restore your system's date & time, however these tests are disabled by default (look for xit_ tests).

LICENSE

Released under the 2-Clause BSD License.

About

Simple storage/archive management comprised of 43 folders per year.

Topics

Resources

License

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors