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.

Default local backup directory

Discussion in 'Data Protection' started by Bruce123, Jun 23, 2014.

  1. Bruce123

    Bruce123 Active Member

    Joined:
    Jul 19, 2005
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    I have read dozens of the threads related to this, and the docs, but I just can't seem to get my head around it. So please forgive if I am just making this too complicated (or I'm just too stupid, missed something really obvious...).

    I would like to configure daily backups by ftp and not leave a copy in the default backup directory after complete.

    In WHM on the backup config screens (both legacy and newer), there is a field for the default backup directory -

    "Default Backup Directory: In this field, you must provide an absolute path to the local backup directory." The field has "/backup" in it by default.

    The legacy config screen additionally has warnings about setting this to the home directory. I assume it's not such a good idea for the newer method. And I understand the need to have sufficient space in the target directory. But I just cannot understand where to set the default /backup directory.

    May someone please tell me where to set this? And do I need to create the directory, or will the system do it if I specify a path and the dir isn't there?

    Here is the report of disk usage on the server -

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 1.9G 416M 1.4G 23% /
    /dev/sda7 431G 60G 349G 15% /home
    /dev/sda5 1.9G 498M 1.4G 28% /tmp
    /dev/sda3 7.6G 5.9G 1.4G 82% /usr
    /dev/sda2 7.6G 2.1G 5.2G 29% /var
    tmpfs 2.0G 0 2.0G 0% /dev/shm

    (I can SSH in and see that there is an empty directory /backup at root level)

    I will SINCERELY appreciate some "Backup Config For Dummies" style guidance on this.

    With many thanks.
     
    #1 Bruce123, Jun 23, 2014
    Last edited: Jun 23, 2014
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    The /backup folder would be located off of /, which is only 1.9G on your server. So this will probably not be a good idea for you. While /home is usually not the best place, you may want to consider using that volume instead because it has enough space to accommodate backups. You can set this to something like /home/backup, or do a bind mount like so:

    Code:
    mkdir /home/backup
    mount --bind /home/backup /backup
    
    And add to /etc/fstab:

    Code:
    /home/backup              /backup                 none    bind    0 0
    

    But, you also said this:

    So if you don't want to store backups locally, why are you asking for help with setting the local default backup directory? Just choose the FTP option and provide the credentials.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can browse to:

    "WHM Home » Backup » Backup Configuration"

    Ensure that "Retain backups in the default backup directory." is not selected and backups will be deleted after being moved to another destination. Note that temporary space is still required when backing up the accounts to a remote destination, so ensure you use a backup directory with free space, as Vanessa mentioned in the previous post.

    Thank you.
     
  4. Bruce123

    Bruce123 Active Member

    Joined:
    Jul 19, 2005
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Thank you, Vanessa and Michael. As always, I appreciate the help I receive here.

    I will create the /home/backup folder and do it that way.
     
  5. Wayne DJ

    Wayne DJ Registered

    Joined:
    Jun 3, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Hi there , i have a similar problem. I need to backup to /home as it has the most space. I have created a /home/backups directory and do not want to keep a copy in the default backup area(disabled local copy) but i get the following error when i select this. ((I have naturally entered /home/backups))

    "Error: Nowhere to back up: no enabled destinations found and retaining local copies is disabled."
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To clarify, are you attempting to make local backups, or do you want backups stored on a remote destination? Is the "Default Backup Directory" not sufficient for your needs?

    Thank you.
     
Loading...

Share This Page