mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Update readme with new migrate command
This commit is contained in:
parent
554d852e68
commit
975ce69bbf
1 changed files with 35 additions and 11 deletions
28
README.md
28
README.md
|
@ -15,6 +15,7 @@ _a simple image hosting service_
|
||||||
3. [Administration](#administration)
|
3. [Administration](#administration)
|
||||||
1. [0.3 to 0.4 Migration Guide](#0-3-to-0-4-migration-guide)
|
1. [0.3 to 0.4 Migration Guide](#0-3-to-0-4-migration-guide)
|
||||||
2. [Filesystem to Object Storage Migration](#filesystem-to-object-storage-migration)
|
2. [Filesystem to Object Storage Migration](#filesystem-to-object-storage-migration)
|
||||||
|
1. [Troubleshooting](#migration-troubleshooting)
|
||||||
4. [Development](#development)
|
4. [Development](#development)
|
||||||
1. [Nix Development](#nix-development)
|
1. [Nix Development](#nix-development)
|
||||||
1. [With direnv and nix-direnv](#with-direnv-and-nix-direnv)
|
1. [With direnv and nix-direnv](#with-direnv-and-nix-direnv)
|
||||||
|
@ -47,8 +48,7 @@ Usage: pict-rs [OPTIONS] <COMMAND>
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
run Runs the pict-rs web server
|
run Runs the pict-rs web server
|
||||||
filesystem Migrate from the provided filesystem storage
|
migrate-store Migrates from one provided media store to another
|
||||||
object-storage Migrate from the provided object storage
|
|
||||||
help Print this message or the help of the given subcommand(s)
|
help Print this message or the help of the given subcommand(s)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -176,6 +176,7 @@ Migrating to object storage from filesystem storage. For more detailed info, see
|
||||||
[Filesystem to Object Storage Migration](#filesystem-to-object-storage-migration)
|
[Filesystem to Object Storage Migration](#filesystem-to-object-storage-migration)
|
||||||
```bash
|
```bash
|
||||||
$ ./pict-rs \
|
$ ./pict-rs \
|
||||||
|
migrate-store \
|
||||||
filesystem -p data/files \
|
filesystem -p data/files \
|
||||||
object-storage \
|
object-storage \
|
||||||
-a ACCESS_KEY \
|
-a ACCESS_KEY \
|
||||||
|
@ -488,6 +489,7 @@ hosting in a cloud environment, since object storage is generally far cheaper th
|
||||||
The command will look something like this:
|
The command will look something like this:
|
||||||
```bash
|
```bash
|
||||||
$ pict-rs \
|
$ pict-rs \
|
||||||
|
migrate-store \
|
||||||
filesystem \
|
filesystem \
|
||||||
-p /path/to/files \
|
-p /path/to/files \
|
||||||
object-storage \
|
object-storage \
|
||||||
|
@ -503,6 +505,7 @@ $ pict-rs \
|
||||||
If you are running the docker container with default paths, it can be simplified to the following:
|
If you are running the docker container with default paths, it can be simplified to the following:
|
||||||
```bash
|
```bash
|
||||||
$ pict-rs \
|
$ pict-rs \
|
||||||
|
migrate-store \
|
||||||
filesystem \
|
filesystem \
|
||||||
object-storage \
|
object-storage \
|
||||||
-e https://object-storage-endpoint \
|
-e https://object-storage-endpoint \
|
||||||
|
@ -536,6 +539,27 @@ access_key = "access-key"
|
||||||
secret_key = "secret-key"
|
secret_key = "secret-key"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Migration Troubleshooting
|
||||||
|
If you have enabled object storage without first migrating your existing files to object storage,
|
||||||
|
these migrate commands may end up retrying file migrations indefinitely. In order to successfully
|
||||||
|
resolve this multi-store problem the `--skip-missing-files` flag has been added to the
|
||||||
|
`migrate-store` subcommand. This tells pict-rs not to retry migrating a file if that file returns
|
||||||
|
some form of "not found" error.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ pict-rs
|
||||||
|
migrate-store --skip-missing-files
|
||||||
|
filesystem -p /path/to/files
|
||||||
|
object-storage \
|
||||||
|
-e https://object-storage-endpoint \
|
||||||
|
-b bucket-name \
|
||||||
|
-r region \
|
||||||
|
-a access-key \
|
||||||
|
-s secret-key
|
||||||
|
sled \
|
||||||
|
-p /path/to/sled-repo
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
pict-rs has a few native dependencies that need to be installed in order for it to run properly.
|
pict-rs has a few native dependencies that need to be installed in order for it to run properly.
|
||||||
|
|
Loading…
Reference in a new issue