• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Remote Server Backups

D

DavidL

Guest
I just wanted to check if the option to do full server backups to remote FTP servers is back in this version. Didn't see anything in the release notes that indicated one way or the other.

Thanks!
 
Well, there's this passage in the release notes:

Backup to FTP

Backup and Restore Utilities allow you and your customers to back up data on remote FTP server and restore backups stored there. Separate FTP backup repository allows you and your customers to efficiently manage your backup files.
 
Thanks, but what I really wanted was to make sure that this was a full server backup that could be scheduled rather than just a domain level backup.

In the 7.5x series full backups could be done from the command line and scheduled through cron, but the 8.0x backup tools didn't have the option to do the full server backup to a remote server.

Just checking to see if this was back in place or what.
 
Running /usr/local/psa/bin/pleskbackup --help doesn't show any options to provide details for a remote host. Of course it is possible to write a script yourself that creates the backup using pleskbackup and sends the backup to a remote host using whatever transfer method you prefer.
 
It is just a little more complicated to send the backup out while it is being created which what the remote backup used to make easy.

It's too bad that such a useful feature got dropped in an upgrade. My sales rep mentioned that it was supposed to be back in 8.1 so I was hoping that someone would be able to confirm it.
 
Maybe it is back, but then they didn't update the --help page properly. The output of --help has changed since 8.0.1 though (you're supposed to use all instead of --all now for instance), so I think it'd be strange if they left the remote options out. You could ask your rep again when this feature will return.
 
You'll have to change "/usr/local/psa/bin/pleskbackup --all /var/backup/backup.bak" to "/usr/local/psa/bin/pleskbackup all /var/backup/backup.bak" for Plesk 8.1. So, change '--all' to 'all'. The old switches do work, but you'll get a warning that they are deprecated and will be removed in the future.
 
That is getting in the direction I was looking, but the old behavior actually opened the FTP connection as soon as the backup started and just dumped the backup out over that without storing a local copy.

As some Plesk installs are fairly large that generally worked better for me so that I didn't end up devoted a lot of the working server to backups and still maintained several copies on the backup location.

Any idea how to do that with the new backup utils?
 
6 months later - still no one who has tried to do a backup directly to a ftp server? :confused:
 
Mine has quite a bit more to it, but this should give you a good starting point. Not all in one command, but it works:

Code:
#!/bin/bash
$ftp_site="ftp.example.com"
$ftp_user="me"
$ftp_pass="uwish"
$theday=`date +%a`

nice -19 /usr/local/psa/bin/pleskbackup -s 100M all /home/backup/plesk_backup-$theday

for i in `ls /home/backup`; do
(echo "open $ftp_site
user $ftp_user $ftp_pass
bin
put /home/backup/$i $i
bye"
) | ftp -n
rm /home/backup/$i
done
 
Although that still dumps the file locally first and then ftp, so a restore would force you to copy the files to the server before doing a restore.
Anyone who has tried on a testserver yet?
 
I'm looking for a solution like this as well.

I need it to backup the plesk server and transfer it directly via FTP or rsync to another server and not write it temporarily first.
 
I would love to use rsync.

But what folders do I tell rsync to backup?

Does anyone have a list of what folders the pleskbackup command actually backs up so I could just mimick it in rsync? How would I get databases and the plesk settings?
 
I would love to use rsync.

But what folders do I tell rsync to backup?

Depends on what you want to backup. We just backup everything (except 'filesystems' like /proc and /sys of course). Diskspace is cheap and you really won't like finding out that the files you need are somehow not in the backup.

Does anyone have a list of what folders the pleskbackup command actually backs up so I could just mimick it in rsync?

The folders are not the same on all OSes. For instance, web files might be in /var/www/vhosts, /home/httpd/vhosts (older install) or maybe even somewhere in /usr/local (FreeBSD, I believe?). The path for your install are listed in /etc/psa/psa.conf.

How would I get databases and the plesk settings?

It's best to run mysqldump on all your databases prior to backing up (Plesk settings are in the MySQL database called 'psa') and then make sure those dumps are backed up using rsync. You could just backup MySQL's data files, but you're not guaranteed to have a working backup in that case (though if it's the only backup you have it's worth trying).
 
You have to write the compressed version of the file to disk somewhere, unless it is really, really tiny. It's using swap at the very least. If you're looking for a bare metal restore, then that is an entirely different issue with it's own gotchas. (ex. physical access to the box)

If your that tight on disk space that you need to stream the backup, you will have issues at some point. Just modify the script above (I use it in production, but with a gpg encryption loop) to pleskbackup and FTP one domain or customer at a time. Although breun's suggestions are probably best for the beginner.

I played around with using the following to actually tar/gzip/ftp files in one swoop, but it failed intermittently (crashing the box!) on large domains. My guess is it ran out of swap, but rather than spend the time, I added disk. Way cheaper in the long run.

Code:
cd /
(echo "open $ftp_site
user $ftp_user $ftp_pass
cd Server
bin
put - email_files-$theday.tgz
bye"
nice tar -zcf - \
   var/qmail/mailnames
) | ftp -n
 
Back
Top