The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Angry because of backup!

Discussion in 'General Discussion' started by anton_latvia, Nov 11, 2005.

  1. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Guys in Cpanel,
    I have something to say about WHM backup and my words won't be best one.
    we are using remote ftp backup and run it daily, weekly and monthly. Now we have a situation, when customer is asking to restore his database from backup 1 week ago or earlier. I looked at backup we have and I see the following situation:
    daily backup - file dated 10.November
    weekly backup - file dated 09.November
    monthly backup - file dated 09.November!

    So having 3 different backups we still can rollback for just 2 days! Then there is no reason for such backup at all!!! I understand, that monthly backup will be kept until 09.December, but right now client is asking for older backup. Is it so difficult to make it more smart?

    Regards,
    Anton.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, they do have to be rotated at some point. Personally, I'd always recommend performing backups locally if you can and then sending an FTP backup off-server yourself on a rotation basis that suits you. That way you would only need to keep one daily backup on server and off-server you can whatever rotation you like.
     
  3. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    yeah, nice idea. We have started to put 2 disks in each server and symlink /home/cpbackuptmp to the second disk to speed it up, probably we will keep it locally also. Can you suggest some nice application, that can do such ftp sending-rotation? rdiff-backup is a super-thing, but it's working only over ssh...
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
  5. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    That script has been working well for me :) I did actually have to install 3 instances of it to grab all the contents of my local /backups/cpbackup/daily. FYI... One for /backups/cpbackup/daily and one for /backups/cpbackup/daily/files and one for /backups/cpbackup/daily/dirs. It doesn't do sub-folder contents.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I've actually started using ncftp to get around that. You need to install the linux client:
    Code:
    wget ftp://ftp.ncftp.com/ncftp/ncftp-3.1.9-src.tar.gz
    tar -xzf ncftp-*
    cd ncftp-*
    ./configure
    make
    make install
    cd ..
    /bin/rm -Rf ncftp-*
    
    And you can then use the following in a shell script or directly in your crontab:

    ncftpput -Rm -u <username> -p <password> <remote-server> <remote-dir> <local-dir>
     
  7. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    cool... thanks for the tip!
     
  8. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    this has got to be one of the most usefull posts I have found this year!!! thanks chirp!!!
     
  9. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38

    And this actually triggers the backup of every account on the server? What am I missing here?
     
  10. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    As far as i can follow the step above, ncftp client just do the transfer for your backup files from your local (main server) to your remote (backup server).

    To backup of every account on the server, you can set the backup configuration from WHM and use standard type to your local backup directory. After this step you can transfer the files using ncftp.

    Is it right chirpy ? :)
     
  11. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    One more thing, if on backup server there is old backup file, is this ncftp client will overwrite the old file ?

    If yes, this will take up more bandwidth than using rsync.
     
  12. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    This is a great solution!

    We need to mount the backup drive before we run this command then unmount it afterwards - how can we do that in the crontab?

    Cheers

    Simon
     
  13. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I use rsync to transfer the cpanel backups to my backup server. Is there any particular advantage to using ncftp over rsync?
     
  14. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    I would suggest to use rdiff-backup, as it is using rsync and has some additional features for backups. So we have daily backup to local drive and then do backup to backup server, which keeps incremental backups of daily backups.
     
  15. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    I also use rdiff-backup and even locally. Instead of having daily. weekly, monthly in the same space I have from Dec 23 until today.
     
  16. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    lloyd_tennison, how much space does backup take? becuase cpanel creates tar.gz files, we have to have quite large amount of space for storing incremental backups. how is it at your side?
     
  17. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Only if you don't have rsync access to your backup store. Some backup solutions, e.g. to a NAS, only have FTP access and using the ncftp method is useful.
     
  18. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Can anyone help with this?

    Cheers

    Simon
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If your backup drive is labelled correctly, then a simple:

    mount /backup ; ncftp command ; umount /backup
     
  20. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    I have a second 120 gig drive and it is 59% full at this time. The main /backup/cpbackup/daily is about 5% larger than the used space in /home -as mysql and a couple of other items are added. But since most of the files rarely change - the off-site backup is always small.

    Sample log:

     
Loading...

Share This Page