1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained PHP CLI Backup Script - SCP Transfer 1.0

PHP Backup Script

  1. Liam W
    I just made this for my own site, and I though I might as well as release it to the general public.

    It probably won't work for most people - it uses the shell_exec command, which will probably be disabled on any shared host for security reasons.

    However, if you have a VPS/dedicated server or a security unconscious shared host, feel free to use it.

    It backs up the specified database and uploads it via SCP to a remote server. You need to have the ssh2 pecl extension installed by the way, or it won't upload.

    Stick the variables in at the top, setup the cron job and let it do the work for you.

    Note: I specifically made this for myself. Support will be virtually non-existant. I am releasing it just incase someone finds it useful.

    Note2: I did say virtually non-existant.

    Note3: Backups saved as yyyymd-hm.sql