DirectAdmin 1.641 - dataskq single execution options

sparek

Verified User
Joined
Jun 27, 2019
Messages
512
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.
 
Or I suppose you could allow DirectAdmin conf changes to be handled directly in the action parameter of taskq.
 
Wondering if this change was ever given any consideration?

Seems that consideration for this was removed in 1.642


And that's really unfortunate. I really need to be able to specify either an alternate directadmin.conf file or specific changes to the directadmin.conf file for certain tasks. I may be the only person that desires such functionality, but the lack of it is really hampering my ability to move forward with some projects.

The ability to specify an alternative directadmin.conf file with a --config parameter, I don't see how that hurts others, because others don't have to use it if they don't want to.
 
Back
Top