We can create backups of the Plesk server, including all data and configurations, or only particular parts like domains, resellers, customers, and mail accounts, thanks to the powerful command-line tool Plesk backup. Let’s discuss the backup process in detail. At Bobcares, with our Plesk Support Service, we can handle your issues.
Overview
- Plesk Backup via Command-Line
- Why We Use Command-Line for Backup?
- Various Plesk Backup Process via Command-Line
- Plesk Backup Restoration via Command-Line
- Conclusion
Plesk Backup via Command-Line
A popular web hosting control panel with lots of features for handling domains, websites, and server setups is Plesk. The ability to make and manage backups via the command line is one of its strong points. With this feature, Plesk admins may backup all of the data and configurations on the server as well as individual components like mail accounts, domains, resellers, and customers.
It is particularly helpful when using the command line for backups if working with huge files that may be difficult to manage through the Plesk interface. We’ll explore the several choices and commands available for using the command line to perform backups in Plesk in this post.
When it comes to handling backups, Plesk’s broad command-line interface (CLI) feature set gives greater flexibility and control than using the graphical user interface (GUI). A closer look at the features of Plesk Backup CLI is the following:
1. Backup Types:
i. Full Server Backup: Backs up everything on the server, including data, configurations, and emails.
ii. Domain Backup: Backs up specific domains, including all related content and settings.
iii. Reseller and Customer Backup: Allows us to back up individual reseller or customer accounts.
2. Backup Locations:
i. Local Storage: Default backups are stored in /var/lib/psa/dumps.
ii. Remote Storage: Backups can be stored on remote FTP servers.
3. Incremental Backups:
Only saves changes since the last backup, saving space and time.
4. Scheduling Backups:
Automate backups using cron jobs to schedule them at regular intervals.
5. Compression and Encryption:
i. Compress backup files to save space.
ii. Encrypt backups to protect sensitive data.
6. Backup Filters:
Choose to back up only certain components like databases or exclude large files.
7. Restore Operations:
Restore entire servers, specific domains, or individual components using the CLI.
8. Advanced Features:
i. Retention Policies: Automatically delete old backups.
ii. Partial Restores: Restore only specific parts of a backup.
iii. Verification: Check the integrity of backup files before restoring.
Why We Use Command-Line for Backup?
In terms of the web interface, Plesk’s command line interface (CLI) is a strong tool that offers more flexibility and control over backup process. The following are some benefits of using the command line for Plesk backups:
1. Large backup files cannot be restored directly using Plesk’s interface. When backups are larger than 2 GB, the command line becomes vital.
2. With the pleskbackup tool, we can fine-tune the backup procedure by choosing which parts to backup.
3. The ease with which command line actions may be programmed makes automatic, scheduled backups possible, which is essential for maintaining regular backup schedules without the need for human involvement.
Various Plesk Backup Process via Command-Line
All backup data in Plesk is kept in the /var/lib/psa/dumps directory by default. All backup files made using the pleskbackup program are saved in this directory. Ensuring this directory has enough room to hold the backup files is crucial, particularly when working with big backups.
Entire Plesk Server Backup
To back up the entire Plesk server, including all data and configurations, we can use the following command:
/usr/local/psa/bin/pleskbackup –server -v
The -v flag is used to display detailed information about the backup process, making it easier to monitor and troubleshoot.
Single Domain Backup
We can back up a single domain, including its emails, hosting files, configuration, and database using the below code:
/usr/local/psa/bin/pleskbackup –domains-name example.com –v
We must replace example.com with the actual domain name.
Mail Configuration and Content Backup
When we only want to back up the mail configuration and content for a specific domain, we can use the following command:
/usr/local/psa/bin/pleskbackup –domains-name example.com –only-mail -v
Hosting Configuration and Content Backup
When we need to back up everything except emails, the following command will come in handy:
/usr/local/psa/bin/pleskbackup –domains-name example.com –only-hosting –v
Resellers Backup
Plesk also enables reseller account backups, an essential feature for service providers overseeing several resellers. To restore a subset of resellers, use this following command:
/usr/local/psa/bin/pleskbackup –resellers-name [Reseller1 Reseller2] –v
When dealing with numerous resellers, clients, or domains, it is more convenient to specify them in a file rather than typing them all out in the command line. Let’s see how to do it:
1. Create a file named resellers.txt containing the login names of all the resellers we want to back up, each on a new line.
/usr/local/psa/bin/pleskbackup –resellers-name –f resellers.txt –v
2. Similarly, for Clients, create a file named clients.txt with the login names of the clients:
/usr/local/psa/bin/pleskbackup –clients-name –f clients.txt –v
3. When we have a list of domains, we can use a file named domains.txt:
/usr/local/psa/bin/pleskbackup –domains-name –f domains.txt –v
Plesk Backup Restoration via Command-Line
It is helpful to restore backups via the command line, especially big ones, to prevent problems that can arise while using the Plesk interface. We can use the following command to restore a complete server backup:
/usr/local/psa/bin/pleskrestore --restore /path/to/backup/file -level server
And to restore a specific domain, we use the command:
/usr/local/psa/bin/pleskrestore --restore /path/to/backup/file -level domains -filter list:example.com
We must replace example.com with our domain name.
[Looking for a solution to another query? We are just a click away.]
Conclusion
Using Plesk backups via the command line offers an effective and adaptable method of managing and safeguarding the data on the server. The pleskbackup tool provides a variety of choices to meet the needs, whether we need to back up the entire server, certain domains, or reseller accounts. We can make sure that the backups are thorough, well-organized, and simple to restore when necessary with these steps from our Tech team.
Frequent backups are an essential component of server administration, and Plesk’s command line may help us do this chore more effectively and dependably.
Nice Article
Hello,
Thank you for your feedback! We are delighted to hear that our article was helpful to you.