Skip to content

Commit e2401ba

Browse files
committed
Merge branch 'main' into release-rs-apr
2 parents f593488 + cc9dfb1 commit e2401ba

File tree

7 files changed

+234
-74
lines changed

7 files changed

+234
-74
lines changed

content/operate/rs/databases/import-export/import-data.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Importing data erases all existing content in the database.
2323

2424
## Import data into a database
2525

26+
### Cluster Manager UI method
27+
2628
To import data into a database using the Cluster Manager UI:
2729

2830
1. On the **Databases** screen, select the database from the list, then select **Configuration**.
@@ -33,6 +35,41 @@ To import data into a database using the Cluster Manager UI:
3335
See [Supported storage locations](#supported-storage-locations) for more information about each storage location type.
3436
1. Select **Import**.
3537

38+
### REST API method
39+
40+
To import data into a database using the REST API, send an [import database request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
41+
42+
```sh
43+
POST /v1/bdbs/<database-id>/actions/import
44+
{
45+
"dataset_import_sources": [
46+
{
47+
"type": "<location-type>",
48+
// additional fields, depending on location_type
49+
},
50+
{
51+
"type": "<location-type>",
52+
// additional fields, depending on location_type
53+
}
54+
]
55+
}
56+
```
57+
58+
- Replace `<database-id>` with the destination database's ID.
59+
60+
- Replace the data source's `<location-type>` with the relevant value from the following options:
61+
62+
| Location type | "type" value |
63+
|---------------|--------------|
64+
| FTPS | "url" |
65+
| SFTP | "sftp" |
66+
| Amazon S3 | "s3" |
67+
| Google Cloud Storage | "gs" |
68+
| Microsoft Azure Storage | "abs" |
69+
| NAS/Local Storage | "mount_point" |
70+
71+
See the following storage location sections for REST API request examples for each location type.
72+
3673
## Supported storage locations {#supported-storage-services}
3774

3875
Data can be imported from a local mount point, transferred to [a URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) using FTP/SFTP, or stored on cloud provider storage.
@@ -70,6 +107,20 @@ Example: `ftp://username:[email protected]/home/backups/<filename>.rdb`
70107

71108
Select **Add path** to add another import file path.
72109

110+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
111+
112+
```sh
113+
POST /v1/bdbs/<database-id>/actions/import
114+
{
115+
"dataset_import_sources": [
116+
{
117+
"type": "url",
118+
"url": "ftp://<ftp_user>:<ftp_password>@example.com/<path>/<filename>.rdb.gz"
119+
}
120+
]
121+
}
122+
```
123+
73124
### Local mount point
74125

75126
Before importing data from a local mount point, make sure that:
@@ -100,6 +151,20 @@ As of version 6.2.12, Redis Enterprise reads files directly from the mount point
100151

101152
Select **Add path** to add another import file path.
102153

154+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
155+
156+
```sh
157+
POST /v1/bdbs/<database-id>/actions/import
158+
{
159+
"dataset_import_sources": [
160+
{
161+
"type": "mount_point",
162+
"path": "/<path>/<filename>.rdb.gz"
163+
}
164+
]
165+
}
166+
```
167+
103168
### SFTP server
104169

105170
Before importing data from an SFTP server, make sure that:
@@ -138,6 +203,20 @@ Example: `sftp://username:[email protected]/home/backups/[filename].rdb`
138203

139204
Select **Add path** to add another import file path.
140205

206+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
207+
208+
```sh
209+
POST /v1/bdbs/<database-id>/actions/import
210+
{
211+
"dataset_import_sources": [
212+
{
213+
"type": "sftp",
214+
"sftp_url": "sftp://<sftp_user>@example.com/<path>/<filename>.rdb"
215+
}
216+
]
217+
}
218+
```
219+
141220
### AWS Simple Storage Service {#aws-s3}
142221

143222
Before you choose to import data from an [Amazon Web Services](https://aws.amazon.com/) (AWS) Simple Storage Service (S3) bucket, make sure you have:
@@ -175,6 +254,24 @@ To connect to an S3-compatible storage location:
175254

176255
Replace `<filepath>` with the location of the S3 CA certificate `ca.pem`.
177256

257+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
258+
259+
```sh
260+
POST /v1/bdbs/<database-id>/actions/import
261+
{
262+
"dataset_import_sources": [
263+
{
264+
"type": "s3",
265+
"bucket_name": "backups",
266+
"subdir": "test-db",
267+
"filename": "<filename>.rdb",
268+
"access_key_id": "XXXXXXXXXXXXX",
269+
"secret_access_key": "XXXXXXXXXXXXXXXX"
270+
}
271+
]
272+
}
273+
```
274+
178275
### Google Cloud Storage
179276

180277
Before you import data from a [Google Cloud](https://developers.google.com/console/) storage bucket, make sure you have:
@@ -198,6 +295,26 @@ In the Redis Enterprise Software Cluster Manager UI, when you enter the import l
198295
- In the **Private key** field, enter the `private_key` from the service account key.
199296
Replace `\n` with new lines.
200297

298+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
299+
300+
```sh
301+
POST /v1/bdbs/<database-id>/actions/import
302+
{
303+
"dataset_import_sources": [
304+
{
305+
"type": "gs",
306+
"bucket_name": "backups",
307+
"client_id": "XXXXXXXX",
308+
"client_email": "[email protected]",
309+
"subdir": "test-db",
310+
"filename": "<filename>.rdb",
311+
"private_key_id": "XXXXXXXXXXXXX",
312+
"private_key": "XXXXXXXXXXXXXXXX"
313+
}
314+
]
315+
}
316+
```
317+
201318
### Azure Blob Storage
202319

203320
Before you choose to import from Azure Blob Storage, make sure that you have:
@@ -220,6 +337,24 @@ In the Redis Enterprise Software Cluster Manager UI, when you enter the import l
220337

221338
- In the **Azure Account Key** field, enter the storage account key.
222339

340+
Example [import database REST API request]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/import">}}):
341+
342+
```sh
343+
POST /v1/bdbs/<database-id>/actions/import
344+
{
345+
"dataset_import_sources": [
346+
{
347+
"type": "abs",
348+
"container": "backups",
349+
"subdir": "test-db",
350+
"filename": "<filename>.rdb",
351+
"account_name": "name",
352+
"account_key": "XXXXXXXXXXXXXXXX" // Or you can use "sas_token": "XXXXXXXXXXXXXXXXXX" instead
353+
}
354+
]
355+
}
356+
```
357+
223358
## Importing into an Active-Active database
224359

225360
When importing data into an Active-Active database, there are two options:

content/operate/rs/installing-upgrading/install/customize-user-and-group.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,26 @@ linkTitle: Customize user and group
1010
weight: 40
1111
---
1212

13-
By default, Redis Enterprise Software is installed with the user:group `redislabs:redislabs`. See [Access control]({{< relref "/operate/rs/security/access-control" >}}) for user and group security information.
13+
By default, Redis Enterprise Software is installed with the user:group `redislabs:redislabs`.
1414

1515
During installation, you can specify the user and group that own all Redis Enterprise Software processes.
1616

17-
If you specify the user only, then installation is run with the primary group that the user belongs to.
17+
## Considerations
1818

19-
{{< note >}}
2019
- Custom installation user is supported on Red Hat Enterprise Linux.
21-
- When you install with custom directories, the installation does not run as an RPM file.
22-
- You must create the user and group before attempting to install Redis Software.
20+
21+
- You must create the user and group before installing Redis Enterprise Software.
22+
23+
- You must install Redis Enterprise Software on all nodes in the cluster with the same user and group.
24+
2325
- You can specify an LDAP user as the installation user.
24-
{{< /note >}}
2526

26-
To customize the user or group during [installation]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}), include the `--os-user` or `--os-group` [command-line options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) when you run the `install.sh` script. For example:
27+
- If you specify the user only, then installation is run with the primary group that the user belongs to.
28+
29+
## Install with custom user or group
30+
31+
To customize the user or group during [installation]({{< relref "/operate/rs/installing-upgrading/install/install-on-linux" >}}), include the `--os-user` or `--os-group` [command-line options]({{< relref "/operate/rs/installing-upgrading/install/install-script" >}}) when you run the `install.sh` script.
2732

2833
```sh
2934
sudo ./install.sh --os-user <user> --os-group <group>
3035
```
31-

content/operate/rs/references/rest-api/requests/users/authorize.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ weight: $weight
1313

1414
| Method | Path | Description |
1515
|--------|------|-------------|
16-
| [POST](#post-authorize) | `/v1/users/authorize` | Authorize a user |
16+
| [POST](#post-authorize) | `/v1/users/authorize` | Generate a token to authorize an authenticated user |
1717

1818
## Authorize user {#post-authorize}
1919

2020
POST /v1/users/authorize
2121

22-
Generate a JSON Web Token (JWT) for a user to use as authorization to access the REST API.
22+
Generates a JSON Web Token (JWT) for a user to use as authorization to access the REST API. The request authentication header must include the relevant username and password.
2323

2424
### Request {#post-request}
2525

@@ -29,12 +29,13 @@ Generate a JSON Web Token (JWT) for a user to use as authorization to access the
2929

3030
#### Example JSON body
3131

32-
```json
33-
{
34-
"username": "[email protected]",
35-
"password": "my_password"
36-
}
37-
```
32+
The request body is optional unless you want to specify the token's time to live:
33+
34+
```json
35+
{
36+
"ttl": <time_in_seconds>
37+
}
38+
```
3839

3940
#### Request headers
4041
| Key | Value | Description |
@@ -44,19 +45,19 @@ Generate a JSON Web Token (JWT) for a user to use as authorization to access the
4445

4546
#### Request body
4647

47-
Include a [JWT authorize object]({{< relref "/operate/rs/references/rest-api/objects/jwt_authorize" >}}) with a valid username and password in the request body.
48+
Optionally include a JSON object in the request body to specify the time to live (`ttl`), which determines the amount of time in seconds the token will be valid. The default `ttl` is `300` seconds. The minimum `ttl` is `1` second and the maximum `ttl` is `86400` seconds.
4849

4950
### Response {#post-response}
5051

5152
Returns a JSON object that contains the generated access token.
5253

5354
#### Example JSON body
5455

55-
```json
56-
{
57-
"access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU"
58-
}
59-
```
56+
```json
57+
{
58+
"access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0..."
59+
}
60+
```
6061

6162
### Error codes {#post-error-codes}
6263

@@ -72,6 +73,6 @@ The following are possible `error_code` values:
7273

7374
| Code | Description |
7475
|------|-------------|
75-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The user is authorized. |
76-
| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | The request could not be understood by the server due to malformed syntax. |
77-
| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. |
76+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The user is authorized. |
77+
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | The request could not be understood by the server due to malformed syntax. |
78+
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |

0 commit comments

Comments
 (0)