Get rid of obsolete yama profiles
This commit is contained in:
parent
a11961e930
commit
e209aea318
@ -1,9 +1,13 @@
|
||||
# Getting Started
|
||||
|
||||
Currently, you are unlikely to want to interact much with `yama` except to create a pile for use with `datman`.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
TODO `cargo install`
|
||||
|
||||
|
||||
## Creating a Pile
|
||||
|
||||
Change to a desired pile directory and use `yama init`.
|
||||
@ -16,29 +20,10 @@ A `yama.toml` file such as the following will be created:
|
||||
yama_version = "0.3.1"
|
||||
storage = "SqliteIndexedBloblog"
|
||||
compression = 12
|
||||
|
||||
[profiles]
|
||||
|
||||
[remotes]
|
||||
```
|
||||
|
||||
This pile has compression enabled (with level 12), and is using SQLite-indexed bloblogs for storage. (No other storage mechanisms are currently recommended.)
|
||||
|
||||
## Adding a Profile
|
||||
|
||||
Add a profile by specifying the directory that you wish to back up. *Not sure if profile functionality will stay around forever; Datman may take over this role.*
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
myprofile = "/home/xyz/files"
|
||||
```
|
||||
|
||||
## Storing to a Profile
|
||||
|
||||
Now use `yama store myprofile` to store the files in to the Yama pile.
|
||||
|
||||
This command will automatically use the latest pointer for this profile as the parent pointer (if one exists) so that incremental storage is performed.
|
||||
|
||||
|
||||
## Retrieving
|
||||
|
||||
@ -46,10 +31,7 @@ Retrieving is currently a bit more difficult.
|
||||
|
||||
Use `yama debug lsp` to list the pointers stored in the database.
|
||||
|
||||
Then use `yama retrieve-adv (pointer ID) dest-path` to retrieve files from the pile and put them into `dest-path`.
|
||||
|
||||
|
||||
TODO this guide still needs work. Once yama is done.
|
||||
Then use `yama retrieve-adv pointer-ID dest-path` to retrieve files from the pile (from pointer `pointer-ID`) and put them into `dest-path`.
|
||||
|
||||
|
||||
## Check
|
||||
|
@ -46,10 +46,7 @@ struct Opts {
|
||||
enum PileCommand {
|
||||
/// Initialise a yama pile in this directory.
|
||||
Init {},
|
||||
/// Store files into the yama pile, under a named profile.
|
||||
Store {
|
||||
// TODO NEEDS ADVANCEMENT
|
||||
},
|
||||
|
||||
/// Retrieve a pointer from the yama pile, using a named pointer name.
|
||||
Retrieve {
|
||||
/// Name of the pointer to retrieve.
|
||||
@ -66,6 +63,7 @@ enum PileCommand {
|
||||
#[clap(long)]
|
||||
num_workers: Option<u8>,
|
||||
},
|
||||
|
||||
/// Check this yama pile for corruption.
|
||||
Check {
|
||||
#[clap(long)]
|
||||
@ -80,6 +78,7 @@ enum PileCommand {
|
||||
#[clap(long)]
|
||||
shallow: bool,
|
||||
},
|
||||
|
||||
/// Enter a debug prompt for manually operating on the yama pile.
|
||||
Debug,
|
||||
|
||||
@ -107,45 +106,6 @@ fn main() -> anyhow::Result<()> {
|
||||
};
|
||||
|
||||
match &opts.command {
|
||||
PileCommand::Store { .. } => {
|
||||
/*let (pdesc, pile) = open_pile()?;
|
||||
let root_dir = pdesc
|
||||
.profiles
|
||||
.get(profile_name)
|
||||
.ok_or_else(|| anyhow!("Profile not found."))?;
|
||||
|
||||
let new_pointer_name = get_pointer_name_at(profile_name.clone(), Utc::now());
|
||||
|
||||
info!("Will save as {:?}", new_pointer_name);
|
||||
|
||||
if pile.read_pointer(&new_pointer_name)?.is_some() {
|
||||
bail!("{:?} already exists. Stopping.", new_pointer_name);
|
||||
}
|
||||
|
||||
let root_node = tree::scan(root_dir)?
|
||||
.ok_or_else(|| anyhow!("{:?} doesn't seem to exist.", root_dir))?;
|
||||
|
||||
let mut parent: Option<String> = None;
|
||||
let prefix = get_pointer_parent_search_prefix(profile_name.clone());
|
||||
for pointer in pile.list_pointers()?.iter() {
|
||||
if pointer.starts_with(&prefix) {
|
||||
match parent.as_ref() {
|
||||
None => {
|
||||
parent = Some(pointer.to_owned());
|
||||
}
|
||||
Some(cur_parent) => {
|
||||
if cur_parent < pointer {
|
||||
parent = Some(pointer.to_owned());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
store_fully(&pile, &root_dir, &new_pointer_name, root_node, parent)?;
|
||||
*/
|
||||
unimplemented!()
|
||||
}
|
||||
PileCommand::Retrieve {
|
||||
pointer_name,
|
||||
subset,
|
||||
|
Loading…
x
Reference in New Issue
Block a user