1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to Back up website?

Discussion in 'Site & Server Administration' started by net4earning, Apr 19, 2008.

  1. #1
    i want to back up all my sites on remote server.
    windows and Linux.
    i'm looking for a script which can zip my site on server.
    and then break them in to small pieces (50 to 100mb). so that i can copy them thru Wget.
     
    net4earning, Apr 19, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    You can use rsync to skip a few steps and compress, transfer, uncompress all your data in one go with minimum hassle.

    Or, if you prefer to do a full backup, you could use tar to pipe the data through SSH to the destination:

    tar cz <my_folder> | ssh <backup server> "cd <backup_dir>;tar xz"
     
    boltok, Apr 20, 2008 IP
  3. nks

    nks Well-Known Member

    Messages:
    1,602
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    160
    #3
    It's easier to use Linux to perform backup. As boltok suggests, you can use tar.gz to compress and download from the remote server.

    Windows is slightly more difficult to do so.
     
    nks, Apr 20, 2008 IP
  4. rootbinbash

    rootbinbash Peon

    Messages:
    2,198
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use rsync for that (google it)
     
    rootbinbash, Apr 20, 2008 IP
  5. bucasia

    bucasia Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'd vote for rsync too. One thing to watch with zip'ing things up is that it's very processor intensive and if 100MB is a 'small piece' you might find your server crawling along for a while.

    Much better to only rsync any changes over.

    Matt
     
    bucasia, Apr 23, 2008 IP
  6. nks

    nks Well-Known Member

    Messages:
    1,602
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    160
    #6
    rsync don't compress file, am I wrong?
     
    nks, Apr 23, 2008 IP
  7. bucasia

    bucasia Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Not sure when it was introduced but rsync3 can certainly compress files during transfer -

    -z, --compress compress file data during the transfer

    Obviously you may, or may not, want to do that as it's going to cost CPU time to do the compression.

    Some backup solutions allow for the data to be compressed on the target server whether it's compressed during transfer or not.

    Matt
     
    bucasia, Apr 23, 2008 IP
  8. nks

    nks Well-Known Member

    Messages:
    1,602
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    160
    #8
    But, if you can compress on the fly, it will save some bandwidth for sure.
     
    nks, Apr 23, 2008 IP