use weed shell commands fs.meta.save/load/notify

Chris Lu 2019-04-17 01:00:27 -07:00
parent 6cab0e8168
commit 67e8233b9e
3 changed files with 21 additions and 4 deletions

@ -59,4 +59,4 @@ Please read the source.filer and sink.filer configurations carefully and make su
The `weed filer.replicate` only replicates files that have been updated. If there are already a lot of files, very likely you would need to copy them too.
To do this, use `weed filer.export -targetStore=notification`, which will iterate all files and generate one "file creation" event for each file to the message queue. Thus, all files will be replicated.
To do this, use `echo 'fs.meta.notify' | weed shell`, which will iterate all files and generate one "file creation" event for each file to the message queue. Thus, all files will be replicated.

@ -86,11 +86,28 @@ The Filer Store persists all file metadata and directory information.
| Postgres | O(logN)| unlimited | Local or Distributed, Fast |Atomic| | Easy to manage, export |
#### Switching between different Stores
It is easy to switch between different filer stores (except memory store).
It is easy to switch between different filer stores.
For example:
```sh
weed filer.export -sourceStore=mysql -targetStore=cassandra
# first save current filer meta data
$ weed shell
> fs.cd http://filerHost:filerPort/
> fs.meta.save
...
total 65 directories, 292 files
meta data for http://localhost:8888/ is saved to localhost-8888-20190417-005421.meta
> exit
# now switch to a new filer, and load the previously saved metadata
$ weed shell
> fs.meta.load localhost-8888-20190417-005421.meta
...
total 65 directories, 292 files
localhost-8888-20190417-005421.meta is loaded to http://localhost:8888/
```
### Extending Storage Options

@ -2,7 +2,7 @@ If there are already a lot of files, how to move them to the SeaweedFS the most
### 1. Setup Filer
1. create a filer.toml file, see the output of "weed scaffold -config=filer"
1. choose and setup a filer data store. It is OK to just pick one and use it. You can always switch later. For example: `weed filer.export -sourceStore=mysql -targetStroe=cassandra`
1. choose and setup a filer data store. It is OK to just pick one and use it. You can always switch later.
3. start the filer
> Example: `weed filer -master=localhost:9333`