When creating backups in Plesk, it's important to protect sensitive information, such as database passwords. By default, Plesk backups are not encrypted, which can expose sensitive information in backup files. However, you can encrypt database passwords to add an extra layer of security.
Here's how you can ensure that database passwords are encrypted during a backup in Plesk:
Step 1: Log in to Plesk
- Open your web browser and navigate to your Plesk login page:
- Example:
https://yourdomain.com:8443
orhttps://your-server-ip:8443
.
- Example:
- Enter your username and password, then click Log In.
Step 2: Access the Backup Manager
- After logging in, navigate to the Tools & Settings tab (for administrators) or Websites & Domains (for individual users).
- In the Tools & Settings section, find and click on Backup Manager under General Settings.
- If you're an individual user managing a website, go to Websites & Domains and click on Backup Manager.
Step 3: Create a Backup
- In the Backup Manager, click on Back Up to start a new backup process.
- Choose the type of backup you want to create (e.g., Full Backup or Incremental Backup).
- In the backup settings, select Backup Destination (Local storage, FTP, or Remote storage).
- Before proceeding, make sure that you understand the Backup Contents section:
- Websites
- Emails
- Databases
- DNS Settings
- Configurations
Step 4: Enable Database Password Encryption (Advanced Option)
Unfortunately, there isn't a direct option to encrypt database passwords specifically in Plesk's backup settings. However, there are a few ways to ensure that the backup file (which may contain database credentials) is securely encrypted.
- Password Protect the Backup:
- While creating the backup, ensure that you store it in an encrypted remote backup destination (such as an FTP server with secure login credentials).
- You can also password-protect the backup file if you're downloading it manually later.
- Use SFTP for Remote Backups:
- To ensure encrypted transmission of backup data, always use SFTP (Secure FTP) instead of standard FTP. This encrypts the entire backup transfer.
- Set up SFTP backup storage in the Backup Settings section:
- Choose SFTP Backup Storage under Backup Settings.
- Provide the SFTP server details (host, username, password).
- Set up a secure folder on the remote server to store your encrypted backups.
Step 5: Manually Encrypt the Backup File
If you want to encrypt the backup file after it is generated, you can use external tools to encrypt the backup file before storing or transferring it. For example, use encryption tools like GPG (GNU Privacy Guard) or OpenSSL.
-
Using GPG:
- After creating the backup file, use a command like this on your server:
- This will encrypt the backup file with a passphrase. You will need to provide the passphrase when decrypting.
-
Using OpenSSL:
- Alternatively, you can use OpenSSL to encrypt the backup file:
bash- openssl enc -aes-256-cbc -salt -in backup-file.tar.gz -out backup-file.tar.gz.enc