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.

Am I wasting space with my backup method?

Discussion in 'Workarounds and Optimization' started by crazyfish, Jul 8, 2009.

  1. crazyfish

    crazyfish Member

    Joined:
    Oct 11, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I've been wondering if I am using my VPS's disk space efficiently. Currently I configured the WHM backup for daily incremental backups of the accounts, account config files and database to a separate backup folder then I use rsync to copy them to an offsite server.

    Is this the best way to use my limited disk space? I was thinking that maybe I should just backup the databases to the backup folder and just use rsync to copy the whole /home folder.

    Any thoughts or opinions?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Incremental backups are inefficient on disk space in the sense that when a file is removed from an account, it is never removed from the incremental backup. To avoid this issue, you could use regular backups but that would lead to more disk I/O (as all data would always be backed up, not just what's changed). Of course, I'm limiting my discussion to cPanel/WHM functionality.

    I'm sure there are custom setups that others can recommend.
     
  3. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    There's no waste of space when it cames to backup :) It can be done on (remote) SATA disks that are large and cheap.

    That looks like a bug to me.. rsync know how to remove files with --delete
    If is not a bug, maybe you can add a "--delete" option for incremental backups in WHM.

    It is possible to create tar.gz backups from cPanel without public_html and rsync the rest. First step can be done by adding public_html in cpbackup-exclude.conf file in each user homedir (but this will also disable backup from user cpanel).

    There's no option in cPanel to create both incremental (daily for example) and tar.gz (every other day).
     
  4. crazyfish

    crazyfish Member

    Joined:
    Oct 11, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I have a huge cheap backup server, but my VPS is starting to get full since i basically have two copies of each user file. I'm a web designer and only host my clients so I want to reduce the amount of disk space used on my VPS since it's more expensive then a backup server.

    That's why I was thinking I should do a database dump and only rsync /home instead of running the backup which copies the same files to /backup then rsync the file to my backup server.

    Does that make sense?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    On one hand, if you delete a file accidentally, it's always a relief to be able to grab it from a backup. On the other hand, if you remove an index.html and replace it with an index.php later on then restore the incremental backup that has both index.html and index.php... that can be frustrating (in addition to a waste of disk space).

    As a result, the current feature request for this has this as an optional setting: Bug 7665 - cpbackup incremental option to remove old content
     
  6. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    Cool, is exactly what I need. I voted for that feature request. Thanks, David!

    In my opinion, backups should be as close as files from user account, no matter if user makes mistakes and accidentally remove files. I curently use incremental backups on some servers + tar in postcpbackup + transfer on backup server using scp. This way I can keep several backups on remote server with lower I/O on main server.
     
Loading...

Share This Page