hashed back up

rain1 a298043769 Added support for spaces in filenames. 9 年之前
bin d46a8fbd22 * README.md: put information into the readme. 9 年之前
hbu 5e826c64e2 * hbu/fname.scm: Import some scsh code for file names/paths. 9 年之前
shell a298043769 Added support for spaces in filenames. 9 年之前
.gitignore d46a8fbd22 * README.md: put information into the readme. 9 年之前
LICENSE 8865545c02 Init commit 9 年之前
README.md b8c9e838bc * hbu/program.scm: prototyping - started working on an append only system. 9 年之前

README.md

hbu

The hbu tool is designed to facilitate both:

  • Maintaining a nicely organized directory of files.
  • Easy to back up the important changes without copying everything over.

concepts

The important concepts are

  • The dump this is just a flat folder with every file dumped inside it, files are renamed to their hash.
  • The tidy this is a nice organized folder hierarchy with symlinks to the dump in it.
  • 'stashing' when a file in the tidy is hashed, moved to the dump and a symlink is put in its place.
  • The configuration files: files named <n>.scm are stored inside config/ subdirectory of the dump. They are a history of the states of the tidy. Only the newest is looked at.

This enables you to reproduce the tidy from the dump+config (if the tidy was deleted for example, or if you just copied the dump over to a separate computer).

commands

There are two main commands:

  • hbu curate <dump-path> [tidy-path]

curate will initialize a dump with a new config file. if the config file already existed it will try to wipe the tidy and populate it with the setup that was stored last.

  • hbu store <dump-path>

store will search for any renamed/moved files, newly added and any deleted files. It will stash the new files and update its config about where everything is.

  • hbu gc

delete things from the dump which aren't referenced by the current config.

installing

To install, let guile find the modules:

cd ~/Code/guile-modules/
ln -s /home/rain/Code/repos/hbu/hbu .

(note that it depends on guix for hashing)

and add the binary to PATH:

cd ~/bin
ln -s ~/Code/repos/hbu/bin/hbu .