Score:0

Can not decrypt automysqlbackup files

us flag

I am trying to move a backup and decrypt it.

# openssl enc -aes-256-cbc -d -in daily_db_2021-11-08_03h00m_Monday.sql.gz.enc -out daily_db_2021-11-08_03h00m_Monday.sql.gz
enter aes-256-cbc decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
140497360426304:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:610:

Runing with -nopad option to openssl doesn't result in an error but I still can not read the resulting file.

# openssl enc -aes-256-cbc -d -in daily_db_2021-11-08_03h00m_Monday.sql.gz.enc -out daily_db_2021-11-08_03h00m_Monday.sql.gz -nopad
enter aes-256-cbc decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.

# zcat daily_db_2021-11-08_03h00m_Monday.sql.gz | head

gzip: daily_db_2021-11-08_03h00m_Monday.sql.gz: not in gzip format

The resulting file is something but not gz.

# ls -lah daily_db_2021-11-08_03h00m_Monday.sql.gz
-rw-r--r-- 1 root root 3.1M Nov  8 14:09 daily_db_2021-11-08_03h00m_Monday.sql.gz

Encryption settings on my server:

# Do you wish to encrypt your backups using openssl?
CONFIG_encrypt='yes'

# Choose a password to encrypt the backups.
CONFIG_encrypt_password='***'

AutoMySQLBackup version 3.0

OpenSSL on both ends:

Server openssl is already the newest version (1.1.1k-1+deb11u1).

Client openssl is already the newest version (1.1.1k-1+deb11u1).

us flag
Are you sure you are using the correct cipher when decrypting?
user6329530 avatar
us flag
I am not sure. I just copied the decrypt line from the automysqlbackup documentation.
Akshay Lokur avatar
hu flag
Facing same issue. Were you able to fix this @user6329530 ? Could you please post the answer if you know? Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.