Jump to content
MakeWebGames

Recommended Posts

Posted

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!

Posted (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 by sniko

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...