Solved Backups failing after changing admin username

shadowq

Verified User
Joined
Dec 5, 2010
Messages
81
So I thought I would attempt changing the default admin username using the change_username.sh script. However, backups are now kicking up an error.

We currently utilise /home/backups/manual_backups/ and /home/backups/user_backups/{date}. Both of these are chowned to the new admin username (same UID anyway). Exact same permission level as other servers (that are still using admin username) according to stat. Same UID/GID.

Error from DA when trying to schedule a manual backup from UI is:

Error during Backup Creation​

Path /home/backups/manual_backups does not exist or is not accessible by the XXXX user.
A component of the path file_name does not exist, or the path is an empty string.

Trying to read that directory from backup restoration is similar error:


When calling a backup direct from shell/root, works fine.

Any suggestions?
 
Nevermind - solved my own issue. For anyone else that is having this issue after changing the admin username:
1) Schedule backup jobs need to be either removed and recreated, or edited in /usr/local/directadmin/data/admin/backup_crons.list to have the "owner=admin" changed to "owner=newusername"
2) For some reason /usr/local/directadmin/data/admin/backup.conf had a space at the start of local_path (eg: local_path= /home/backups/user_backups/2024-12-17), even though this was NOT showing on the UI. I confirmed by removing it and adding it again on the UI and it still wouldn't work. Once I removed the space on the .conf, all was good there.
 
Back
Top