Skip to content

Commit

Permalink
docs: Updated after arg changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Oct 13, 2023
1 parent fe6dd36 commit a752cb7
Show file tree
Hide file tree
Showing 23 changed files with 597 additions and 691 deletions.
44 changes: 0 additions & 44 deletions docs/guide/src/docs/asciidoc/architecture.adoc

This file was deleted.

96 changes: 78 additions & 18 deletions docs/guide/src/docs/asciidoc/databases.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,85 @@
[[_databases]]
= Databases
= Database Import/Export

{project-title} can import from and export to databases.

[[_db_import]]
== Import from a SQL Database

The `db-import` command imports data from a relational database into Redis.

NOTE: Ensure {project-title} has the relevant JDBC driver for your database.
See the <<_database_drivers,Drivers>> section for more details.

[source]
----
riot -h <redis host> -p <redis port> db-import --url <jdbc url> SQL [REDIS COMMAND...]
----

To show the full usage, run:

[source]
----
riot db-import --help
----

[[_db_import_redis_commands]]
:redis-commands-example: riot db-import "SELECT * FROM customers" hset -h myredis.com -p 6380
include::{includedir}/redis-commands.adoc[leveloffset=+1]

[[_db_import_examples]]
=== Examples

.PostgreSQL Example
[source]
----
include::{testdir}/db-import-postgresql[]
----

.Import from PostgreSQL to JSON strings
[source]
----
include::{testdir}/db-import-postgresql-set[]
----

This will produce Redis strings that look like this:
[source,json]
----
include::{includedir}/../resources/order.json[]
----

[[_db_export]]
== Export to a SQK Database

Use the `db-export` command to read from a Redis database and writes to a SQL database.

The general usage is:
[source]
----
riot -h <redis host> -p <redis port> db-export --url <jdbc url> SQL
----

To show the full usage, run:
[source]
----
riot db-export --help
----

[[_db_export_reader_options]]
=== Redis reader options
include::{includedir}/reader-options.adoc[leveloffset=+2]

[[db_export_examples]]
=== Examples
.Export to PostgreSQL
[source]
----
include::{testdir}/db-export-postgresql[]
----

[[_database_drivers]]
== Drivers
== Database Drivers

{project-title} relies on JDBC to interact with databases.
It includes JDBC drivers for the most common database systems:

Expand All @@ -30,19 +105,4 @@ For non-included databases you must install the corresponding JDBC driver under
* *nix: `bin/riot` -> `CLASSPATH=$APP_HOME/lib/myjdbc.jar:$APP_HOME/lib/...`
* Windows: `bin\riot.bat` -> `set CLASSPATH=%APP_HOME%\lib\myjdbc.jar;%APP_HOME%\lib\...`
====

:leveloffset: 2
include::{includedir}/db-import.adoc[]
include::{includedir}/db-export.adoc[]
:leveloffset: 1

////
* {link_jdbc_db2}
+
`jdbc:db2://host:port/database`
* {link_jdbc_sqlite}
+
`jdbc:sqlite:sqlite_database_file_path`
////
====
28 changes: 0 additions & 28 deletions docs/guide/src/docs/asciidoc/db-export.adoc

This file was deleted.

47 changes: 0 additions & 47 deletions docs/guide/src/docs/asciidoc/db-import.adoc

This file was deleted.

10 changes: 0 additions & 10 deletions docs/guide/src/docs/asciidoc/dump-import.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/guide/src/docs/asciidoc/elasticache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Ensure that the above command allows you to connect to the remote Elasticache da
=== Installing {project-title}

Let's install {project-title} on the EC2 instance we set up previously.
For this we'll follow the steps for <<_linux_install,Linux installation>>.
For this we'll follow the steps in <<_manual_install,Manual Installation>>.

== Performing Migration

Expand Down
65 changes: 0 additions & 65 deletions docs/guide/src/docs/asciidoc/faker-import.adoc

This file was deleted.

12 changes: 6 additions & 6 deletions docs/guide/src/docs/asciidoc/faq.adoc
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[[_faq]]
= Frequently Asked Questions

== Logs are cut off or missing
Logs are cut off or missing::
This could be due to concurrency issues in the terminal when refreshing the progress bar and displaying logs.
Try running with job options `--progress log`.

== Unknown options: '--keyspace', '--keys'
`Unknown options: '--keyspace', '--keys'`::
You must specify one or more Redis commands with import commands (<<_file_import,`file-import`>>, <<_faker_import,`faker-import`>>, <<_db_import,`db-import`>>).

== ERR DUMP payload version or checksum are wrong
`ERR DUMP payload version or checksum are wrong`::
Redis 7 DUMP format is not backwards compatible with previous versions.
To replicate between different Redis versions, use <<_replicate_type_based,Type-Based Replication>>.

== Process gets stuck during replication and eventually times out
Process gets stuck during replication and eventually times out::
This could be due to big keys clogging the replication pipes.
In these cases it might be hard to catch the offending key(s).
Try running the same command with `--info` (see <<_general_options,General options>>) and `--progress log` so that all errors are reported.
Try running the same command with `--info` (see <<_logging_options,Logging options>>) and `--progress log` so that all errors are reported.
Check the database with `redis-cli` {link_bigkeys} and/or use the <<_source_reader_options,source reader options>> to filter these keys out.

== NOAUTH Authentication required
`NOAUTH Authentication required`::
This issue occurs when you fail to supply the `--pass <password>` parameter.
40 changes: 0 additions & 40 deletions docs/guide/src/docs/asciidoc/file-export.adoc

This file was deleted.

Loading

0 comments on commit a752cb7

Please sign in to comment.