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
46
README.md
46
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)
|
||||||
|
@ -46,10 +47,9 @@ A simple image hosting service
|
||||||
Usage: pict-rs [OPTIONS] <COMMAND>
|
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:
|
||||||
-c, --config-file <CONFIG_FILE>
|
-c, --config-file <CONFIG_FILE>
|
||||||
|
@ -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,13 +505,14 @@ $ 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 \
|
||||||
filesystem \
|
migrate-store \
|
||||||
object-storage \
|
filesystem \
|
||||||
-e https://object-storage-endpoint \
|
object-storage \
|
||||||
-b bucket-name \
|
-e https://object-storage-endpoint \
|
||||||
-r region \
|
-b bucket-name \
|
||||||
-a access-key \
|
-r region \
|
||||||
-s secret-key
|
-a access-key \
|
||||||
|
-s secret-key
|
||||||
```
|
```
|
||||||
|
|
||||||
_This command must be run while pict-rs is offline._
|
_This command must be run while pict-rs is offline._
|
||||||
|
@ -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