Issue with restoring from backup file

Hi,

I have copied over the the site directory to a new install of erpnext which includes the site_config.json file. However whenever I try to import the database it appears to not decrypt the file and tries to import a unencrypted binary file. The error I keep getting is
ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 of ASCII ‘\0’ is expected. Viewing the file displays garbage as in not an SQL file bit all binary.

Try Unzip the file, and then import again.
https://stackoverflow.com/questions/17158367/enable-binary-mode-while-restoring-a-database-from-an-sql-dump/20086949

Already unzipped by bench but still shows as a binary file. If I dump directly using MySQL I get the file in the correct format. It appears the backup is getting encypted but not decrypted on the bench --force restore mydatabase.sql.gz (or after decompression mydatabase.sql)

I used gzip -d mydatabase.sql and the file is now in the correct format. Looks like it was compressed twice? So two unzips were required