Backup & Restore through Terminal

hmaddy

Verified User
Joined
Apr 17, 2019
Messages
288
How can i create account backups and restore backups through command line.
 
DirectAdmin isn't exactly noted for having great documentation.

To back up an account from the command line run:

/usr/local/directadmin/directadmin taskq --run="action=backup&append_to_path=nothing&database_data_aware=yes&email_data_aware=yes&local_path=%directory%&owner=%owner%&select0=%user%&trash_aware=yes&type=admin&value=multiple&when=now&where=local"

Changing the %directory%, %owner%, and %user% variables as necessary.

To restore an account from a backup:


/usr/local/directadmin/directadmin taskq --run="action=restore&ip_choice=select&ip=%ip%&local_path=%directory%&owner=%owner%&select0=user.%owner%.%user%.tar&type=admin&value=multiple&when=now&where=local"

Changing the %ip%, %directory%, %owner%, and %user% variables as necessary.
 
Back
Top