From f5202f482a8034080243213f2bc2ca9c64c58783 Mon Sep 17 00:00:00 2001 From: Kremilly Date: Thu, 19 Dec 2024 14:24:40 -0300 Subject: [PATCH] docs: update export and import documentation to include encryption options for dump files --- docs/export.md | 17 ++++++++++++++--- docs/import.md | 8 ++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/export.md b/docs/export.md index 0975f57..1886f09 100644 --- a/docs/export.md +++ b/docs/export.md @@ -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. diff --git a/docs/import.md b/docs/import.md index c77c7b0..5ec75ef 100644 --- a/docs/import.md +++ b/docs/import.md @@ -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.