Perhaps this should go in the DirectAdmin v1.641 has been released thread, but seems that topic was taking a different angle.
The ability to run taskqueue items directly:
https://docs.directadmin.com/change...d-da-taskq-for-ad-hoc-dataskq-tasks-execution
is definitely a start. But still doesn't provide the functionality I was seeking.
For me, to run backups (as root), I use a task queue command of something like:
action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local
The caveat being, under the old dataskq method, you could specify an alternative directadmin.conf file to read options from using the --config= parameter
echo "action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local" >/usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq --config=/path/to/alternative/directadmin.conf --custombuild d200
Then in /path/to/alternative/directadmin.conf, I could set options, such as:
skip_domains_in_backups=1
skip_hometargz_in_backups=1
skip_imap_in_backups=1
While leaving these options, disabled in the primary - /usr/local/directadmin/conf/directadmin.conf
Reason being, when I run nightly backups - I just want the stuff that's in the backup package, I don't want any of the home directory contents... I'm going to rsync that data separately. I don't want to churn the disk every night copying home directories that probably haven't changed that much for every backup run.
BUT... I want the stuff in the home directory to be backed up if a user initiates a backup through their control panel. Thus that's the reason the skip_domains_in_backups, skip_hometargz_in_backups, and skip_imap_in_backups options are disabled in the default /usr/local/directadmin/conf/directadmin.conf
The new way of running dataskq directly doesn't provide a way to specify an alternative directadmin.conf file or to change any of the options from the server-wide /usr/local/directadmin/conf/directadmin.conf - at least that I am aware of.
/usr/local/directadmin/directadmin taskq '--run=action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local'
will back up ${THEUSER} but it backs up the whole home directory.
Perhaps environment variables could be passed on the command line that take precedence over the options in /usr/local/directadmin/conf/directadmin.conf? i.e.:
skip_domains_in_backups=1 skip_hometargz_in_backups=1 skip_imap_in_backups=1 /usr/local/directadmin/directadmin taskq '--run=action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local'
Just a thought or suggestion.
The ability to run taskqueue items directly:
https://docs.directadmin.com/change...d-da-taskq-for-ad-hoc-dataskq-tasks-execution
is definitely a start. But still doesn't provide the functionality I was seeking.
For me, to run backups (as root), I use a task queue command of something like:
action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local
The caveat being, under the old dataskq method, you could specify an alternative directadmin.conf file to read options from using the --config= parameter
echo "action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local" >/usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq --config=/path/to/alternative/directadmin.conf --custombuild d200
Then in /path/to/alternative/directadmin.conf, I could set options, such as:
skip_domains_in_backups=1
skip_hometargz_in_backups=1
skip_imap_in_backups=1
While leaving these options, disabled in the primary - /usr/local/directadmin/conf/directadmin.conf
Reason being, when I run nightly backups - I just want the stuff that's in the backup package, I don't want any of the home directory contents... I'm going to rsync that data separately. I don't want to churn the disk every night copying home directories that probably haven't changed that much for every backup run.
BUT... I want the stuff in the home directory to be backed up if a user initiates a backup through their control panel. Thus that's the reason the skip_domains_in_backups, skip_hometargz_in_backups, and skip_imap_in_backups options are disabled in the default /usr/local/directadmin/conf/directadmin.conf
The new way of running dataskq directly doesn't provide a way to specify an alternative directadmin.conf file or to change any of the options from the server-wide /usr/local/directadmin/conf/directadmin.conf - at least that I am aware of.
/usr/local/directadmin/directadmin taskq '--run=action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local'
will back up ${THEUSER} but it backs up the whole home directory.
Perhaps environment variables could be passed on the command line that take precedence over the options in /usr/local/directadmin/conf/directadmin.conf? i.e.:
skip_domains_in_backups=1 skip_hometargz_in_backups=1 skip_imap_in_backups=1 /usr/local/directadmin/directadmin taskq '--run=action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=/backup/packages&owner=admin&select%30=${THEUSER}&type=admin&value=multiple&when=now&where=local'
Just a thought or suggestion.