| Crates.io | little-becky |
| lib.rs | little-becky |
| version | 0.1.0 |
| created_at | 2025-08-23 01:27:30.804796+00 |
| updated_at | 2025-08-23 01:27:30.804796+00 |
| description | Simple backup with copy-on-change model. |
| homepage | |
| repository | https://github.com/eirtools/little-becky |
| max_upload_size | |
| id | 1807121 |
| size | 56,903 |
This tool watches provided source files and automatically copies them to destination folder by adding an index to a filename.
Initial design and implementation comes from a requirement to backup multiple save files when game uses autosave feature or has very limited amount of slots.
WARNING: This way of backing up is neither secure nor perfect. In most scenarios there's better solution.
At the moment there's few known design limitations, which maybe will improved in the future.
Consider the section as an unofficial TODO list. Feel free to make a PR to fix any of them or discuss to gather more information and/or propose a solution ideas.
Files, target file naming and input
<original-filename>_<hex counter>.<extension>.100ms and it's not configurable.std::fs::copy is used to copy files (filename to filename).Modify event is used to determine when it's needed to copy a file.
I haven't tested other events.Logging and output
simplelog probably is not the best choice, but it works well enough.Internals
papaya::HashMap and AtomicBool inside Arc inside a state structure.
It's possible that this is an overkill for sync, as it supposed to be updated once in a debounce time.notify listener thread.Testing