+ Reply to Thread
Results 1 to 18 of 18




  

Thread: SSH Program - Auto Backup

      
  1. #1
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default SSH Program - Auto Backup

    Anyone know of a good SSH program that I could setup to automatically connect to my servers at a set time 'such as once a day' to download my server backup folder?

  2. #2
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    I'm currently doing backups manually. mg:

    Could some enterprising young individual who is automating their website/database backups please write a nifty tutorial for noobs like me who don't even know where to begin?

    It would be nice to automate the whole process and get my ass covered automatically.
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  3. #3
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    Quote Originally Posted by Zap View Post
    I'm currently doing backups manually. mg:

    Could some enterprising young individual who is automating their website/database backups please write a nifty tutorial for noobs like me who don't even know where to begin?

    It would be nice to automate the whole process and get my ass covered automatically.
    I'm trying to be lazy myself

    What do you have cpanel reseller, whm ?

    I can setup my whm to make backups to ftp to a different server, right now I just have it making them on the harddrive but if the hd fails there goes the backup along with the sites. Would like to automatically download them nightly, or at least weekly.

  4. #4
    Will Work For Coffee :-} Big Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond reputeBig Dan has a reputation beyond repute Big Dan's Avatar
    Join Date
    October 14, 2006
    Location
    New York
    Posts
    1,954
    Rep Power
    8
    Feedback Score
    0

    Default

    I read somewhere a while back a way of doing it with three cron jobs.

    Setup a cron job on the main server to make a backup every so often then move it to a public location.

    On the back up server setup a cron job to grab the backup

    Back on the main server set a cron to delete the public backup an hour or so later.

    I toyed with doing it this way but I didn't want my backups to be public for any amount of time.

    How about windows task schedule.. Set it to automatically run an FTP client at 3am or so.. If you can configure the FTP client to automatically connect and grab the file you're all set.
    Big Dan
    DJ Talk - Where DJ's meet! | Almost Geek - Geeky Tutorials and Stuff | Got Email Questions?

  5. #5
    I'm New! chovy is on a distinguished road chovy's Avatar
    Join Date
    November 11, 2006
    Location
    Santa Cruz, CA
    Posts
    37
    Rep Power
    6
    Feedback Score
    0

    Default

    rsnapshot.org and rsnapshotDB

  6. #6
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    Quote Originally Posted by grim View Post
    I'm trying to be lazy myself

    What do you have cpanel reseller, whm ?

    I can setup my whm to make backups to ftp to a different server, right now I just have it making them on the harddrive but if the hd fails there goes the backup along with the sites. Would like to automatically download them nightly, or at least weekly.
    I have 3 reseller accounts with WHM/cPanel etc.
    I also have 4 computer systems at home that are on 24/7, so I guess I'd need to create files on the web servers on a schedule and then get some software for home that could connect, download and disconnect automatically.
    It's just trying to work everything out that's giving me a headache.
    I don't know how to automate backups (reliably) on the web server and I need to locate some software for my workstation at home.
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  7. #7
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    A few interesting ideas in here thank you
    Download a few programs, did some reading and have though of something. How about setting up a virtual ftp server on your 'my' home network. The whm allows the backup to be sent to an ftp server, this would cause it to be directly sent to the ftp server on the home network.

    Now the question is what program to use, and if my main server at home will work or to setup a linux box or net appliance for the job!

  8. #8
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    Quote Originally Posted by grim View Post
    A few interesting ideas in here thank you
    Download a few programs, did some reading and have though of something. How about setting up a virtual ftp server on your 'my' home network. The whm allows the backup to be sent to an ftp server, this would cause it to be directly sent to the ftp server on the home network.

    Now the question is what program to use, and if my main server at home will work or to setup a linux box or net appliance for the job!
    I don't have access to the server. So, I can't install software.
    But, if I can setup a backup in WHM and have it FTP to somewhere, then I'm all set!
    I already have an FTP server in use at home with the port forwarded through my firewall.
    I just have to add a user for the backup connection and assign permissions to it.

    WooHoo!! Now, I just have to figure out the webserver half of it and I'm done.

    Thanks Grim. (Can it be done by site in cPanel? Or does it have to be in WHM?)
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  9. #9
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    Quote Originally Posted by Zap View Post
    I don't have access to the server. So, I can't install software.
    But, if I can setup a backup in WHM and have it FTP to somewhere, then I'm all set!
    I already have an FTP server in use at home with the port forwarded through my firewall.
    I just have to add a user for the backup connection and assign permissions to it.

    WooHoo!! Now, I just have to figure out the webserver half of it and I'm done.

    Thanks Grim. (Can it be done by site in cPanel? Or does it have to be in WHM?)
    It depends if your host gave you the permission / option. You might beable to ask.

    My one reseller account I have does not give me the option, my VPS and dedicateds however do.

    Backup
    Configuration File Rollback
    Configure Backup
    Restore Backups
    Restore Multiple Backups
    Restore a Full Backup/cpmove file
    This lets me setup full backups, I can make the backup on the server or set it up to transfer to a remote server. I can also set it daily, weekly, etc

    I'm trying something right now though that should work for you on a standard hosting account. WS_FTP Pro has a nice automatic backup and synch capability built in! I setup a scheduled task and it's working ATM, backing up and synching my new VPS account!

    God am I lazy, if this works it will rock!

    BTW it's WHM that I have that option.

    What do you use for your in home ftp server? Software?....
    Last edited by grim; Nov 16th, 2006 at 1:41 pm.

  10. #10
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    HA HA HA! Great minds think alike, but different.

    I have been playing with the Backup function in cPanel on one of my websites.
    I have been able to get it to make a full backup of everything, tar.gz the file and FTP it directly to it's own folder on my FTP server. It worked! The only problem is that it is still a manual process. If I can figure out the command that was used to do all that and cron it, I am home free!!!

    My FTP server at home is running Windows 2000 Server with the native FTP server installed.
    I also have a free account at dyndns.org so I can have a static DNS name on my home IP.

    Windows XP Pro (I don't know about Home Edition) is actually enough to run an FTP server on...
    Start > Control Panel > Add/Remove Programs > Windows Components > Internet Information Services > Details button > FTP Service
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  11. #11
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    Quote Originally Posted by Zap View Post
    tar.gz the file and FTP it
    I changed my backups over to compression as well now I was hoping to save some bandwidth and power by only backing up what needed to be, but the compressed is going to be easier.

    Chron job would be nice as hexx...

    I still may end up setting up an ftp server on this end, but think for now I may try simply using an ftp client. Does pretty much the same thing, plus this way I get a backup on my server and then again onto my home network all automatic. If I used the ftp option for the backup I would not get a server backup on the server.

  12. #12
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    Still looking but found this in my travels...
    http://www.tech-pro.net/site-backup-cp.html
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  13. #13
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    BINGO!!!

    http://www.gohostme.com/content/back.php

    Cron that sucker and you're all set!
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  14. #14
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    Quote Originally Posted by Zap View Post
    Still looking but found this in my travels...
    http://www.tech-pro.net/site-backup-cp.html
    That proggie looks promising, per cpanel.

    I wonder if there is one out there that connects to the whm backup, to backup the entire account 'all domains' and settings! that would rock!

  15. #15
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    I'll probably be doing a blog post about it shortly, but here's the amended script...

    PHP Code:
    <?php

    // PHP script to allow periodic cPanel backups automatically.
    // Based on script posted by max.hedroom in cpanel.net forums
    //   This script contains passwords.  KEEP ACCESS TO THIS FILE SECURE!

    // ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED *********

    // Info required for cPanel access
    $cpuser ""// Username used to login to CPanel
    $cppass ""// Password used to login to CPanel
    $domain ""// Domain name where CPanel is run
    $skin "x"// Set to cPanel skin you use (script won't work if it doesn't match)

    // Info required for FTP host
    $ftpuser ""// Username for FTP account
    $ftppass ""// Password for FTP account
    $ftphost ""// Full hostname or IP address for FTP host
    $ftppath "//"// Full path on FTP server to save files to
    $ftpmode "ftp"// FTP mode ("ftp" for active, "passiveftp" for passive)

    // Notification information
    $notifyemail "you@yoursite.com"// Email address to send results

    // Secure or non-secure mode
    $secure 0// Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP

    // Set to 1 to have web page result appear in your cron log
    $debug 0;

    // *********** NO CONFIGURATION ITEMS BELOW THIS LINE *********

    if ($secure) {
       
    $url "ssl://".$domain;
       
    $port 2083;
    } else {
       
    $url $domain;
       
    $port 2082;
    }

    $socket fsockopen($url,$port);
    if (!
    $socket) { echo "Failed to open socket connection... Bailing out!\n"; exit; }

    // Encode authentication string
    $authstr $cpuser.":".$cppass;
    $pass base64_encode($authstr);

    $params "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$ftppass&rdir=$ftppath&submit=Generate Backup";

    // Make POST to cPanel
    fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0\r\n");
    fputs($socket,"Host: $domain\r\n");
    fputs($socket,"Authorization: Basic $pass\r\n");
    fputs($socket,"Connection: Close\r\n");
    fputs($socket,"\r\n");

    // Grab response even if we don't do anything with it.
    while (!feof($socket)) {
      
    $response fgets($socket,4096);
      if (
    $debug) echo $response;
    }

    fclose($socket);

    ?>
    This script will allow you to make a full backup of your website (files/databases/settings/etc.) and it will FTP a tar.gz file of the full backup to any FTP server you specify and any path on that FTP server that you choose. You can fully automate the process by using cron to schedule the execution of the php file.

    I am now officially a LAZY WTF'er! :twisted:
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

  16. #16
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    Quote Originally Posted by Zap View Post
    I am now officially a LAZY WTF'er! :twisted:
    Hell yeah! :evil:

  17. #17
    Grand Masters grim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond reputegrim has a reputation beyond repute grim's Avatar
    Join Date
    September 22, 2006
    Posts
    10,060
    Rep Power
    25
    Feedback Score
    0

    Default

    I'm still tweaking my settings, but I think I've got it almost all the way I want it. Sucks the server backups get so big though, takes alot of bandwidth to download it!

    May end up only doing it weekly instead of daily on the vps accounts because of limited bandwidth.

  18. #18
    Zap
    Zap is offline
    I Love Lesbians! Zap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond reputeZap has a reputation beyond repute Zap's Avatar
    Join Date
    September 29, 2006
    Location
    Canada, Eh?
    Posts
    4,385
    Rep Power
    10
    Feedback Score
    0

    Default

    The frequency I set depended largely on the website.

    I took a few things into account...

    Size of website.
    Frequency of changes to files/databases.

    Some of my sites are backed up every day, some are 3 times a week, some are weekly and some (without databases) are monthly.
    Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Auto Social Poster
    By mrichards1984 in forum Blogging
    Replies: 0
    Last Post: Mar 23rd, 2008, 12:24 am
  2. Replies: 9
    Last Post: Mar 20th, 2008, 3:20 am
  3. I got into an auto accident with grim
    By WikicyloN in forum Forum Lounge
    Replies: 4
    Last Post: Jan 3rd, 2008, 4:08 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads