Update readme.
This commit is contained in:
51
README.md
51
README.md
@@ -1,3 +1,52 @@
|
|||||||
# BSV - Backup, Synchronization, Versioning
|
# BSV - Backup, Synchronization, Versioning
|
||||||
|
|
||||||
Readme to be done.
|
Bsv is a tool to perform backups, file/directory synchronization between devices and light versioning. It's architecture is inspired from git, but focus on backup first, synchronization second and as a byproduct also allow versioning.
|
||||||
|
|
||||||
|
Bsv is in a very early stage of development and is not production ready yet.
|
||||||
|
|
||||||
|
|
||||||
|
## Development setup
|
||||||
|
|
||||||
|
Bsv currently only supports Python >= 3.11. Once you have a compatible Python version, just fetch the code and install bsv in editable mode in a virtual env:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://git.draklia.net/draklaw/pybsv.git
|
||||||
|
cd pybsv
|
||||||
|
python -m venv venv
|
||||||
|
. venv/bin/activate
|
||||||
|
pip install -e .[test]
|
||||||
|
```
|
||||||
|
|
||||||
|
This will automatically install the dependencies (including `pytest`). Happy hacking !
|
||||||
|
|
||||||
|
|
||||||
|
## Roadmap
|
||||||
|
|
||||||
|
### v0.0.1 - MVP
|
||||||
|
|
||||||
|
- [ ] `bsv init [<destination>] [--repo <local-repo-path>]` command to initialize bsv.
|
||||||
|
- [ ] `bsv repo [-v]` list all known repositories.
|
||||||
|
- [ ] `bsv repo create <name> <destination>` create a new repository.
|
||||||
|
- [ ] `bsv repo add [<name>] <destination>` add an already existing repository.
|
||||||
|
- [ ] `bsv repo remove <name>|<destination>` remove a repository.
|
||||||
|
- [ ] `bsv map` list mappings between bsv paths and filesystem paths.
|
||||||
|
- [ ] `bsv map add <bsv-path> <fs-path>` add a mapping.
|
||||||
|
- [ ] `bsv map remove <bsv-path> <fs-path>` remove a mapping.
|
||||||
|
- [ ] `bsv log` show the history of snapshots.
|
||||||
|
- [ ] `bsv show <digest>` show the object `digest`.
|
||||||
|
- [ ] `bsv ls <bsv-path>` list files in a bsv directory.
|
||||||
|
- [ ] `bsv mkdir <bsv-path>` create a directory in bsv directly.
|
||||||
|
- [ ] `bsv add <fs-path> <bsv-path>` copy files from the filesystem to bsv.
|
||||||
|
- [ ] `bsv get <bsv-path> <fs-path>` copy files from bsv to the filesystem.
|
||||||
|
- [ ] `bsv snapshot` capture a snapshot, i.e. to ensure that mapped files in the repositories match what is on the filesystem.
|
||||||
|
- [ ] `bsv restore <snapshot> <fs-path>` update files on the filesystem to the version captured by `snapshot`.
|
||||||
|
- [x] Simple CAS implementation (it's OK if it's naïve).
|
||||||
|
- [x] Content-based chunking to store files.
|
||||||
|
|
||||||
|
### Later
|
||||||
|
|
||||||
|
- [ ] `bsv fetch [<name>]` fetch latest metadata from known repositories.
|
||||||
|
- [ ] `bsv sync` similar to `snapshot` + `fetch` + `restore`: Fetch latest changes from the repositories and update the filesystem to match. In case of conflict (file changed both in the repositories and locally), performs a snapshot first to ensure all conflicting versions are backed'up, then use some conflict-resolution strategy and warn the user.
|
||||||
|
- [ ] `bsv tag <name> [<snapshot>] [-m <message>]` set/update a tag (an alias to a specific snapshot).
|
||||||
|
- [ ] `bsv watch` starts a daemon that watch changes in mapped directories and automatically create snapshots.
|
||||||
|
- [ ] `bsv serve` starts an http server that expose an API + an interface to manipulate BSV. Allow to list files, explore history, download and upload files...
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ test = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
# TODO
|
"Homepage" = "https://git.draklia.net/draklaw/pybsv"
|
||||||
# "Homepage" = "https://github.com/pypa/sampleproject"
|
"Bug Tracker" = "https://git.draklia.net/draklaw/pybsv/issues"
|
||||||
# "Bug Tracker" = "https://github.com/pypa/sampleproject/issues"
|
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
bsv = "bsv.main:main"
|
bsv = "bsv.main:main"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ from bsv.command import command
|
|||||||
|
|
||||||
def init_parser(parser: ArgumentParser):
|
def init_parser(parser: ArgumentParser):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--name", "-d",
|
"--name", "-n",
|
||||||
help = "Name of the repository. Default to system hostname.",
|
help = "Name of the repository. Default to system hostname.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from io import BytesIO
|
|||||||
from pathlib import Path, PurePosixPath
|
from pathlib import Path, PurePosixPath
|
||||||
import platform
|
import platform
|
||||||
import tomllib
|
import tomllib
|
||||||
from typing import TYPE_CHECKING, BinaryIO, Callable, Self, Type
|
from typing import TYPE_CHECKING, BinaryIO, Callable, Self
|
||||||
|
|
||||||
from fastcdc import fastcdc
|
from fastcdc import fastcdc
|
||||||
import tomlkit
|
import tomlkit
|
||||||
|
|||||||
Reference in New Issue
Block a user