0
Welcome Guest! Login
0 items Join Now

How to back up your site - worst nightmare?

    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • for what it's worth i'll explain what i do for 'backup'.

      First on my local machine, i have an external firewire drive of the same capacity as my primary drive (250gb), i use SuperDuper to do a 'smart' backup every night. basically this means that my external drive has an exact copy of my main drive, and each night it modifies the differences between the drives so it's not a complete copy every time. I've not had a problem, but feel confident that if i did, i could just reboot and boot off the external drive and be back and operational within seconds.

      On my server I wrote a simple shell script that just tar.gz's up the entire rockettheme directory, and also dumps the entire mysql db, then ftp's them over to a backup server. It's setup as a cron job and i get a report daily to ensure it occured. Also on my server i have mirrored drives, so if 1 drive fails it should work fine off the second drive until the drive is replaced.

      I feel my bases are pretty well covered with this setup.

      also, fyi, backing up a specifc joomla site is easy, just do tar -cvzf yoursite.tar.gz yoursitedir/ this will tar.gz the entire site and it's pretty fast. Then you can use phpMyAdmin or something similar (I use Navicat), and just export the db. You can even move these from server to server and only have to change the joomla configuration.php file. Very easy.
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • It's easy now you have posted the step by step :D

      And Andy, how many soldiers stay all night long near your drives and servers? I'm sure Rambo himself has been employed to look at your computer ;D
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • heh.. i've had some bad experiences.. so i'm probably a bit overly cautious.. but you never know what will happen.
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • Andy Miller wrote:
      heh.. i've had some bad experiences.. so i'm probably a bit overly cautious.. but you never know what will happen.

      I've been a victim too :P I lost 2 drives... and 1 site because an issue with a component!

      Andy, the code mentioned above ( -cvzf yoursite.tar.gz yoursitedir/ ) is to use in the cronjob?
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • This is the script exactly:
      #!/bin/sh
      HOST='YOURBACKUPSERVER'
      USER='USERNAME'
      PASSWD='PASSWORD'
      DATE=`date +%Y%m%d`
      TMP_DIR=/tmp
      IGNORE_FILE=/tmp/ignorefiles.txt
      FILE_DB=rocket_db_$DATE.sql
      FILE_WWW=rocket_www_$DATE.tar.gz
      DOMAIN=/var/www/vhosts/rockettheme.com
      DB_USER='DBUSER'
      DB_PASSWORD='DBPASSWORD'
       
      # mysql db
      echo 'dumping mysql databases....'
      mysqldump --opt -u $DB_USER -p$DB_PASSWORD --all-databases > $TMP_DIR/$FILE_DB
      cd $TMP_DIR
      tar czf $FILE_DB.tar.gz $FILE_DB
      rm $FILE_DB
       
      #file system
      echo 'dumping rocket directory...'
      cd $DOMAIN
       
      find . -type d -name 'logs'  > $IGNORE_FILE
      find . -type d -name '*cache*' >> $IGNORE_FILE
       
      tar -czf $TMP_DIR/$FILE_WWW ./* --exclude=./statistics/logs/*  --exclude=*cache/* --exclude=*tmp/*  --exclude=./download/*
       
       
      cd $TMP_DIR
      ftp -n $HOST <<END_SCRIPT
      quote USER $USER
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • Thanks Andy! ;D
    • Steve N's Avatar

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • also, fyi, backing up a specifc joomla site is easy, just do tar -cvzf yoursite.tar.gz yoursitedir/ this will tar.gz the entire site and it's pretty fast. Then you can use phpMyAdmin or something similar (I use Navicat), and just export the db. You can even move these from server to server and only have to change the joomla configuration.php file. Very easy.

      Andy: Sorry, I'm clueless when it comes to things like this. The steps you described sounds quite easy to do. The only problem (for me) is that I don't know how. ???

      Also, is there something "simple" which will let me backup my Joomla site? I only have one server (Go Daddy) and would like to start backing up my site but I don't know how. Is JoomlaCloner the best solution for me or is there something even easier and better?
    • Firefrog's Avatar
    • Firefrog
    • Rocketeer
    • Posts: 95
    • Thanks: 0

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • I'm experimenting with a piece of software that relies on a small script and windows scheduling to trigger the script and begin a backup of the site and grab the sql.

      Still need to get the script correct but it looks promising. The software I'm trying is here www.iopus.com/download/iopus-file-downloader.zip

      You just right a small .bat file and run it.

      I have tried a backup plugin bot, this is sending me a mysql backup of one of my small sites but is not sending through the backups of my larger site. Still trouble shooting that..
    • Dave Goodwin's Avatar
    • Dave Goodwin
    • Elite Rocketeer
    • Posts: 1472
    • Thanks: 4
    • Howdy!!

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • Steve N wrote:
      also, fyi, backing up a specifc joomla site is easy, just do tar -cvzf yoursite.tar.gz yoursitedir/ this will tar.gz the entire site and it's pretty fast. Then you can use phpMyAdmin or something similar (I use Navicat), and just export the db. You can even move these from server to server and only have to change the joomla configuration.php file. Very easy.

      Andy: Sorry, I'm clueless when it comes to things like this. The steps you described sounds quite easy to do. The only problem (for me) is that I don't know how. ???

      Also, is there something "simple" which will let me backup my Joomla site? I only have one server (Go Daddy) and would like to start backing up my site but I don't know how. Is JoomlaCloner the best solution for me or is there something even easier and better?

      Hi Steve,

      My hosting company offers a scheduled backup. That the easiest way for me.

      I have heard good things about JoomlaCloner, but, alas, it's not free. I would like to hear a vote yea or nay for JoomlaCloner before Steve breaks open the wallet. Any input?

      dave
    • "I'm an individual, just like everyone else."
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: How to back up your site - worst nightmare?

    Posted 17 years 10 months ago
    • For me it's a really great component. Just need to install JCron Sheduler from JoomlaPlug too. $49.95 for 1 year and you can use it with unlimited websites! It's not free but very easy to use and I don't worry anymore. It's just my humble opinion but I really think that's a good investment.

Time to create page: 0.078 seconds