Use custom backup directory instead of virtualmin-backup

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/.



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".

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.

So, would it work if the backups were still scheduled by root, but the files were owned by the domain being backed up?

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.

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

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.

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!

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?

Currently virtualmin-backup is hard-coded, although I suppose that could be made configurable pretty easily. I'll do that in the next release.