Samurai Legend Posted April 7, 2014 Posted April 7, 2014 Hello all, is there any way of me using a script to send a whole backup of my website to my email? I so far just have a backup for my database to my email. It sends an backup to my email every hour. Requires a hour cron. If you want this script, just mail me and I will give you the website link of who made it and how to install it to your website. But as for now, I need to find out how to send a backup to my email! If anyone knows any information about how please mail me or comment below! Quote
Guest Posted April 7, 2014 Posted April 7, 2014 If you use cPanel there should be a backup option? Quote
sniko Posted April 7, 2014 Posted April 7, 2014 (edited) Create a bash script that creates a tar tar -czpf /path/to/files/protected/backup.tar.gz /path/to/files [*]Create a cron that runs every x hours, and invokes this bash script [*]Use a decent e-mail api, and attach the /path/to/files/protected/backup.tar.gz file to the e-mail, and send it to your email address via PHP [*]Run unlink("/path/to/files/protected/backup.tar.gz"); after the e-mail has been sent Edited April 7, 2014 by sniko Quote
Samurai Legend Posted April 7, 2014 Author Posted April 7, 2014 I didn't understand sorry, I am still a newbie :P Ill be researching about a bash...hope nothing dirty comes up. Quote
KyleMassacre Posted April 8, 2014 Posted April 8, 2014 You can maybe look at this use it. Post made by Alix Axel and then just add that to your list of attachment. After you send the file just unlink() it like sniko stated and you should be good to go Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.