Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Drive crypt failing #376

Closed
kleo opened this issue Apr 25, 2024 · 2 comments
Closed

Google Drive crypt failing #376

kleo opened this issue Apr 25, 2024 · 2 comments

Comments

@kleo
Copy link

kleo commented Apr 25, 2024

Good day! Trying out phpbu and I'm having trouble on syncing to Google Drive with crypt.

Same result when using SSL cert encryption

No issues on syncing without crypt.

phpbu --version
phpbu 6.0.23 by Sebastian Feldmann and contributors.
/opt/phpbu/config.json

{
  "verbose": true,
  "logging": [
    {
      "type": "json",
      "target": "/opt/phpbu/json.log"
    }
  ],
  "backups": [
    {
      "name": "<db>",
      "source": {
        "type": "mysqldump",
        "options": {
          "host": "<ip>",
          "databases": "<db>",
          "user": "<user>",
          "password": "<password>"
        }
      },
      "target": {
        "dirname": "/opt/phpbu",
        "filename": "mysql-%Y%m%d-%H%i.sql",
        "compress":"bzip2"
      },
      "crypt": {
        "type": "openssl",
        "options": {
          "password": "mySecretPassword",
          "algorithm": "aes-256-cbc"
        }
      },
      "syncs": [
        {
          "type": "googledrive",
          "options": {
            "secret": "config/google/secret.json",
            "access": "config/google/access.json",
            "parentId": "<parentId>"
          }
        }
      ],
      "cleanup": {
        "type": "Capacity",
        "options": {
          "size": "30G"
        }
      }
    }
  ]
}
phpbu --verbose --configuration=config.json
phpbu 6.0.23 by Sebastian Feldmann and contributors.

Runtime:       PHP 8.1.2-1ubuntu2.15
Configuration: /opt/phpbu/config.json

Time: 9 seconds, Memory: 6.00MB

Exception 'phpbu\App\Backup\Sync\Exception' with message 'Failed to parse Content-Range header.'
in /home/ubuntu/.config/composer/vendor/phpbu/phpbu/src/Backup/Sync/GoogleDrive.php:146

backup db: OK, but skipped or failed Crypts, Syncs or Cleanups!

          | executed | skipped | failed |
----------+----------+---------+--------+
 checks   |        0 |         |      0 |
 crypts   |        1 |       0 |      0 |
 syncs    |        1 |       0 |      1 |
 cleanups |        1 |       1 |      0 |
----------+----------+---------+--------+

WARNING, skipped|failed Crypts, Syncs or Cleanups!
Backups: 1, Crypts: 0|0, Syncs: 0|1, Cleanups: 1|0

File without crypt

-rw-rw-r-- 1 ubuntu ubuntu  810 Apr 25 14:56 mysql-20240425-1456.sql.bz2

File with crypt

-rw-rw-r-- 1 ubuntu ubuntu 1.2K Apr 25 14:58 mysql-20240425-1458.sql.bz2.enc
@kleo
Copy link
Author

kleo commented Apr 25, 2024

I tried mcrypt as the encryption option and syncs without any issue.

@kleo
Copy link
Author

kleo commented Apr 26, 2024

checked out #373 and also tried out compress zstd. all good now. thanks @veebkolm!

@kleo kleo closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant