sebastianfeldmann / phpbu

PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process
https://phpbu.de
Other
1.29k stars 110 forks source link

Incomplete remote MySQL backups? #360

Closed YouveGotMeowxy closed 8 months ago

YouveGotMeowxy commented 8 months ago

I'm really putting PHPBU through it's paces right now, as I'm getting things all setup. LOL

I'm running into another problem; I'm trying to do a mysql backup on a remote server, and PHPBU is only getting about 30 lines of backup, and then says it's done, and all went well.

phpbu is being run on a shared host, which is also where target -> dirname is, and the MySQL db being backed up is on my home IP.

Any idea why this might be?

Here's my config:

{
  "verbose": true,
  "logging": [
    {
      "type": "json",
      "target": "./phpbu-oc.log"
    }
  ],
  "backups": [
    {
      "name": "Authelia",
      "source": {
        "type": "mysqldump",
        "options": {
          "host": "<my home IP>",
          "port": "3306",
          "databases": "authelia",
          "user": "authelia",
          "password": "<my db pw>"
        }
      },
      "target": {
        "dirname": "/home/domain/public_html/dbbackup",
        "filename": "authelia-%Y-%m-%d-%H%i.sql",
        "compress": "bzip2"
      },
      "crypt": {
        "type": "openssl",
        "options": {
          "password": "<my ossl pw>",
          "algorithm": "aes-256-cbc"
        }
      },
      "syncs": [
        {
          "type": "dropbox",
          "options": {
            "token": "< my dbox hash that expires after 4 hours :) >",
            "path": "/Backups/DB/OC/Authelia"
          }
        }
      ],
      "cleanup": {
        "type": "capacity",
        "options": {
          "size": "0B",
          "deleteTarget": "true"
        }
      }
    }
  ]
}
YouveGotMeowxy commented 8 months ago

Figured it out. Looks like in order to do a backup the user for that db requires ALL PRIVILEGES, including the Admin grants.