Skip to content

Commit

Permalink
docs: update export and import documentation to include encryption op…
Browse files Browse the repository at this point in the history
…tions for dump files
  • Loading branch information
Kremilly committed Dec 19, 2024
1 parent d00ba7c commit f5202f4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,31 @@ dumpsync export -d my_database -i 3600 -f /path/to/
### Options

- **-d my_database**: Specifies the name of the database you want to export. Replace `my_database` with the actual name of your database.

- **-i 3600**: Sets the interval (in seconds) for the dump process. In this example, the interval is set to 3600 seconds (1 hour). You can adjust this value based on your requirements.

- **-f /path/to/**: Indicates the file path where the dump will be saved. Replace `/path/to/` with the desired directory path on your system.
- **--encrypt**: (Optional) Encrypts the dump file using AES-256 encryption. This option requires a password to encrypt and decrypt the dump file.

### Example

To create a dump of a database named `example_db` with an interval of 2 hours and save it to the `/backups/` directory, you would run:

```bash
dumpsync export -d example_db -i 7200 -f /backups/
dumpsync export
```

### Encrypt Dumps

To create an encrypted dump file, you can add the `--encrypt` option to the command:

```bash
dumpsync export --encrypt
```

The encryption process use AES-256 encryption and will prompt you to enter a password for the encryption and decryption of the dump file.

### Notes

- The export process will create a dump file of the specified database at the specified interval.
- If you choose to encrypt the dump file, you will need to provide a password during the encryption process.
- Ensure that the specified path for the dump exists and that you have the necessary permissions to write to that directory.
- Adjust the interval according to your backup strategy to ensure that you have up-to-date dumps without overwhelming your database resources.
8 changes: 8 additions & 0 deletions docs/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ To restore a database from a dump file located at `/backups/example_dump.sql`, y
dumpsync import -f /backups/example_dump.sql
```

### Encrypted Dumps

```bash
dumpsync import -f /backups/example_dump.sql.aes
```

DumpSync detects encrypted dump files and automatically decrypts them during the import process. If your dump file is encrypted, you can still use the `import` command as shown above.

### Notes

- Ensure that the dump file exists and that you have the necessary permissions to read it.
Expand Down

0 comments on commit f5202f4

Please sign in to comment.