Store backup on different directory

Operating System & Version
Centos 7
cPanel & WHM Version
v102.0.11

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Hi guys, i hope that all is well wit all you, look i have this situation:
I have 14 servers that send their backups to a main server with WHM and an additional HD,
On the mail server i created linux users with their respective passwords for each server
On each server i configured rsync on the additional destination tab, all workss fine, except by the reason that the backup is stored in each home userdir
Is possible to configure on WHM the option to store those backups for each user (server) on the /backup partition?

A solution that i thought is change the path for each user homedir instead /home/user change it to /backup/home/user or something similar

I expect for your advices,
Thanks in advance
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,481
1,966
363
cPanel Access Level
Root Administrator
Hey there! The transfer just connects as the user configured in the remote destination, so it's going to place the files in the user's home directory. I think changing the user's homedir on the remote server as you mentioned is likely the easiest solution.
 
  • Like
Reactions: samuelmf

samuelmf

Well-Known Member
May 22, 2006
143
9
168
Perú
Simply open this file using a text editor, type:
vi /etc/default/useradd
The default home directory defined by HOME variable, find line that read as follows:
HOME=/home
Replace with:
HOME=/iscsi/user
Save and close the file. Now you can add user using regular useradd command:
# useradd vivek
# passwd vivek
Verify user information:
# finger vivek
If i do those steps, it will affect the new cpanel accounts homedir?