Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP autobackup
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP autobackup

Is there any backup scripts in pgp like mover.io ? I have two servers, so i want the contents in server 1 to be auto backed up to server 2.

Mover.io does it to dropbox and other places. I want the backup to run automatically everyday. Something like mover.io, but it won't be public. Just private use for myself.

Is it possible ?
It's like i want to backup the whole server from root drectory. When backing up, it should check if the file was unchanged and it was unchanges, it should skip and get to the next file :D

Comments

  • Rsync?

  • The second server is a home server, so it can upload the files. Or else it can also zip or tar the files before uploading and it doesn't need to mind about changed/unchanged file.
    I saw this : http://ubuntuforums.org/showthread.php?t=682039 . . . this will do if it can backup whole server from root. I also want scripts to backup all mysql files :D

  • @AutoSnipe said:
    Rsync?

    It says backup and stuff. But read my above comment. Can it do that ? My files in the server are soo important and I sometimes do some edit to server configurations, so its better to have a backup always

  • I use the following tool to back up to S3. It's cheap and I don't take care of another server. :)
    http://s3tools.org/s3cmd-sync

    My s3cmd command line: Tested with Centos 6.x and Debian 7.x.

    s3cmd sync --delete-removed --exclude-from /home/user-account/excludes.files /home/user-account/public_html/ s3://amazon-bucket/backup/user-account/public_html/

  • Tenshi_420Tenshi_420 Member
    edited December 2013

    (Delete my reply please, not sure why Android switched pages while trying to post)

  • nunimnunim Member
    edited December 2013

    rsync --update -avzh /root/backup user@homeserver:/backupdir/

    MySQL Backup script, run as root, assumes my.cnf exists, set Dir to an existing directory

    #!/bin/bash
    #MySQL Backup Script
    #directory to backup to, MUST EXIST
    Dir=/root/backup
    ##############################
    Dump="/usr/bin/mysqldump --skip-extended-insert --force"
    MySQL=/usr/bin/mysql
    Today=$(date "+%m-%d-%y")
    # Get a list of all databases
    Databases=$(echo "SHOW DATABASES" | $MySQL)
    for db in $Databases; do
            file="$Dir/$db-$Today.sql.gz"
            echo "Backing up $db on $Today to: "
            echo "   $file"
            $Dump $db | gzip > $file
    done
    Thanked by 2KKS21199 hdpixel
Sign In or Register to comment.