To create DirectAdmin backups from the command line for ALL the accounts on the server, execute the command:

echo "action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&owner=admin&type=admin&value=multiple&when=now&where=local&who=all" >> /usr/local/directadmin/data/task.queue

To create a backup for a specific user – USERNAME – run the command:

echo "action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&owner=admin&select%30=USERNAME&type=admin&value=multiple&when=now&where=local" >> /usr/local/directadmin/data/task.queue

Notice that the above commands will not output any results to the shell. You will receive a message “Your backups are now ready” like from a backup initiated from the DA GUI. To output a debug log to a file – eg. /root/backup.log – use:

echo "action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&owner=admin&select%30=USERNAME&type=admin&value=multiple&when=now&where=local" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000 >/root/backup.txt 2>&1

An example of a debug-log file:

da backup shell
DirectAdmin backup debug log

The path where the backups will be created is

/home/admin/admin_backups

Links:
Create/restore backups for users in DirectAdmin
DA Help Site