When a webmin user schedules backup, then the system always creates a directory under that user's home directory like: /home/username/virtualmin-backup/weekly-2016-11-01
. So I have two questions with this regard:
1) I'd like to set a server-wide backup directory at /backup and then create per user sub-directories like /backup/username and attribute them to respective user's group and ownership. Would it be possible to make Virtualmin use custom backup directories? If yes, where exactly I can set custom backup directories?
2) If the above not possible and Virtualmin always stores in "File or directory under virtualmin-backup/" then I would like to be able to shorten virtualmin-backup just to backup. How can I do that? Note that using language file changes only interface: despite US shows File or directory under custom-path-backup/ it always stores backups in /home/username/virtualmin-backup/.
Comments
Submitted by andreychek on Wed, 11/02/2016 - 10:14 Comment #1
Howdy -- looking at the code, it appears to be hard coded to use $HOME/virtualmin-backup.
Sorry, but it doesn't appear that there is a way to change that (though Jamie will be sure to correct me if that's not the case).
If you need a shorter name for "virtualmin-backup", all you could really do there is create a symlink from "backup" that points to "virtualmin-backup".
Submitted by yngens on Wed, 11/02/2016 - 12:37 Comment #2
Eric, I know about symbolic link, but the purpose was to completely take backups out of websites' home directories and place them on a server-wide backup directory at /backup. And generally it is not a good idea to hard code this as the users should be able to choose backup directories of their own preferences like on other control panels.
Submitted by yngens on Wed, 11/02/2016 - 14:40 Comment #3
Just would like to link the related issue.
Submitted by JamieCameron on Wed, 11/02/2016 - 23:30 Comment #4
So, would it work if the backups were still scheduled by root, but the files were owned by the domain being backed up?
Submitted by yngens on Thu, 11/03/2016 - 01:11 Comment #5
Well, I believe it would, but current behavior is that the Webmin users do not see any backups scheduled by root user. And that was why I thought maybe we should fix backups by Webmin users. Would be really nice to let Webmin users to choose their backup destinations. And if it must be within their home directories then please let them choose custom names instead of hard-coded virtualmin-backup.
Submitted by JamieCameron on Thu, 11/03/2016 - 23:25 Comment #6
I suppose Virtualmin could allow them to backup to any directory that they have write permissions to. However, this runs the risk of filling up shared directories like /tmp
Submitted by yngens on Fri, 11/04/2016 - 13:36 Comment #7
Let's put some short warning about that kind of risk and let them choose any backup destination. Because in many cases it is really convenient to devote a special /backup directory and let users store their backup files within it.
Submitted by JamieCameron on Fri, 11/04/2016 - 19:22 Comment #8
It would have to be an option that the admin can enable if he wants to take the risk.
Also, it would have to disallow backups to the domain's home dir, to prevent backups that include themselves!
Submitted by yngens on Sun, 11/06/2016 - 06:41 Comment #9
I don't know, Jamie. Tell me what is the viable solution here? Can you just please change virtualmin-backup just to backup and be with this feature request?
Submitted by JamieCameron on Sun, 11/06/2016 - 11:45 Comment #10
Currently
virtualmin-backup
is hard-coded, although I suppose that could be made configurable pretty easily. I'll do that in the next release.