--- layout: post status: publish published: true title: Automated CPanel Backups with SCP wordpress_id: 531 wordpress_url: http://www.martineve.com/?p=531 date: !binary |- MjAxMS0wMS0wOCAwODo0MTozMiArMDEwMA== date_gmt: !binary |- MjAxMS0wMS0wOCAwODo0MTozMiArMDEwMA== categories: - Technology - PHP tags: - Backup comments: - id: 6115 author: Vanessa author_email: admin@v-nessa.net author_url: http://v-nessa.net date: !binary |- MjAxMS0wMS0xNCAxNTowMDowOCArMDEwMA== date_gmt: !binary |- MjAxMS0wMS0xNCAxNTowMDowOCArMDEwMA== content: Very nice! I don't think I've updated my original script since 2006! - id: 6509 author: Jon author_email: ferrari_41@hotmail.com author_url: '' date: !binary |- MjAxMS0wNy0yNSAxNDoyMDowMCArMDIwMA== date_gmt: !binary |- MjAxMS0wNy0yNSAxNDoyMDowMCArMDIwMA== content: ! 'Hi Thank you for the script. I tried to run it by it came up with error message: please check the host hostname.com and username and password) I can confirm that host, user name and password were all correct. I could run it from the control panel. Are you able to help? Regards Jon' - id: 6510 author: Martin Paul Eve author_email: martin@martineve.com author_url: https://www.martineve.com date: !binary |- MjAxMS0wNy0yNSAxNDoyODowMCArMDIwMA== date_gmt: !binary |- MjAxMS0wNy0yNSAxNDoyODowMCArMDIwMA== content: ! 'So, just to confirm, you have changed the username, password and host in the script? What version of CPanel are you using? The $skin variable must be set to correctly refer to this. ' ---
Originally from V-Nessa's site, I thought I would share the PHP script that I have now modified to include Secure Copy (SCP) support.
{% highlight php %} {% endhighlight %}If you need help with usage, it's exactly the same as in V_Nessa's original post, so read there, but now supports copying to a remote host over SSH.