Symptoms
Creating a user backup via the cPanel interface "cPanel / Backup" or the API results in the backup disappearing after completion.
Description
When a backup is created, its contents are first written to a temporary location. Once the backup is completed, the system uses the rename system call to move the content from the temporary location to the destination point, which is usually within the user's home directory. If the temporary and destination paths are not mounted on the same filesystem, the rename system call will fail to execute.
Using the strace command on the process will display the following error for the rename attempt.
rename("/home/24937.BIN_ADMIN_CPANEL_BACKUP_PL__.423a7848.tmp/backup-12.6.2020_$USER.tar.gz",
"/home/$USER/backup-12.6.2020_$USER.tar.gz") = -1 EXDEV (Invalid cross-device link)
Workaround
It is not standard to have a user's home directory mounted in a separate filesystem. Generally, these mounts were created by accident or by any troubleshooting steps the system's administrator may have taken. If this is the case, you can address this by removing the mount.
umount $MOUNTED_DIRECTORY
Please note that you would replace the $MOUNTED_DIRECTORY value with the actual path that is mounted.
The problematic mount can generally be located using this command:
mount|grep -P '\s/home.?/(?!virtfs)'
For example, this would display information like the following output.
[root@server ~]# mount|grep -P '\s/home.?/(?!virtfs)'
/dev/vda1 on /home/user type xfs (rw,relatime,attr2,inode64,usrquota)
Comments
0 comments
Article is closed for comments.