Default local backup directory

Bruce123

Active Member
Jul 19, 2005
39
1
158
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.
 
Last edited:

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
835
29
178
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:

I would like to configure daily backups by ftp and not leave a copy in the default backup directory after complete.
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
I would like to configure daily backups by ftp and not leave a copy in the default backup directory after complete.
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.
 

Bruce123

Active Member
Jul 19, 2005
39
1
158
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.
 

Wayne DJ

Registered
Jun 3, 2015
1
0
1
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."
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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."
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.