It's remarkable how many people need this type of intervention. I receive quite a few private messages asking me to perform this operation.
Each scenario I've been privately approached with was legitimate, which is why I'm happy to assist.
However, there's no secret.
@SteveITS and I discussed this openly in another forum thread.
I simply use Linux command lines. I'll share the method I use, hoping it might help those who hesitate to contact me.
Other methods might work too, but I'm sharing the one that has been successful for me.
Needless to say, this is not supported by 3CX, so there's no point in opening a ticket with 3CX if it doesn't work for you.
You will need to have zip and unzip installed on your Linux environment where you'll be performing the operation.
+
Have an unencrypted 3CX backup ready.
I don’t have time right now to write a detailed procedure, but those who are familiar should understand.
Bash:
# Write the name of the compressed 3CX backup folder into a variable.
Backup3CXzip=(*.zip) # Replace (*.zip) with the name of your 3CX backup file. If it's the only .zip file in the directory, (*.zip) will select the first .zip file it finds in the current directory.
Bash:
# Automatically find the .xml file at the root of the backup.
XmlFile=$(unzip -l "$Backup3CXzip" | awk '/^[ ]+[0-9]+[ ]+/{if (!match($4, /\//) && $4 ~ /\.xml$/) print $4}' | head -n 1)
# Decompress only this file.
unzip -o "$Backup3CXzip" "$XmlFile" -d ./ &>/dev/null && chmod +w "./$XmlFile"
echo "You can now edit the decompressed xml file with a text editor like nano."
You can now edit the decompressed xml file ( licence, FQDN ect.. )
When finished, recompress the XML file:
Bash:
zip -j -u -q "$Backup3CXzip" "$XmlFile"
Have a great day, everyone!