Low priority Plesk backups

I hear a lot of complaints about Plesk's backup routines and how they can bring a server to its knees. You can reduce the load (except for mysqldumps) by renicing pleskbackup. If you want something really handy, use this Perl scriptlet that I wrote:

#!/usr/bin/perl
@domains = `ls /var/www/vhosts/ | egrep -v '^default\$|^chroot\$'`;
$today = `date +%m%d%y`;
foreach $domain (@domains) {
chomp($domain);
$cmd = "nice -n 19 /usr/local/psa/bin/pleskbackup -vv domains $domain --skip-logs - | ssh someuser\@somehost -i /home/username/.ssh/id_rsa \"dd of=/home/username/pleskbackups/$domain-$today.dump\"";
`$cmd`;
}

It will transmit your backups to another server via SSH, and it will reduce the priority to the lowest available. This combination will reduce CPU usage and disk I/O throughout the backup.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2007/09/05/low-priority-plesk-backups/ .
© Major Hayden 2010.

2 Comments   »

  • red77 says:

    In the restore

    /usr/local/psa/bin/pleskrestore --create-map domain.org-030808 -map map_domain

    ####map_domain#######

    [] # The client not exists.

    domain.org 111.111.111.111 # IP address 111.111.111.111 does not belong to target client's '' IP pool
    mysql::@localhost:3306
    ####map_domain#######

    /usr/local/psa/bin/pleskrestore --restore domain.org-030808 -level domains -filter list:domain.org -map map_domain
    ## ERROR in line 1: Bad client login

    we edit map_domain

    ####map_domain#######

    [client] # The client not exists.
    111.111.111.111

    domain.org 111.111.111.111 # IP address 111.111.111.111 does not belong to target client's '' IP pool
    mysql::@localhost:3306
    ####map_domain#######

    /usr/local/psa/bin/pleskrestore --restore domain.org-030808 -level domains -filter list:domainorg -map map_domain
    ------------------------------------------------------------------------
    Restore has been started
    ------------------------------------------------------------------------
    Tiempo perdido: 00:00:00
    Tiempo perdido: 00:00:05Client client does not exist, but is expected to.

  • PaliGap says:

    I thought I would try this - and it's great!

    Except...

    I thought I would try a test restore through the GUI. So I deleted my test domain from Plesk. Then re-created it, and uploaded my *.dump file to the repository. But Plesk just said "Not a backup file" and would not allow a restore. I guess I am missing something pretty basic?

RSS feed for comments on this post , TrackBack URI

Leave a Reply