Results 1 to 2 of 2
  1. #1
    Join Date
    May 2010
    Location
    iran-zanjan
    Posts
    164

    Arrow How to create a full backup of all accounts in directadmin via the command line

    If your server is on it's way to being fully dead, or your license has expired, you can still create backups via the command line. To do so, run the following command:

    Code:
    echo "action=backup&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups%32&owner=admin&type=admin&value=multiple&when=now&where=local&who=all" >> /usr/local/directadmin/data/task.queue
    And make sure that the dataskq is running by checking /var/log/cron. If it isn't you can run the dataskq manually to create the backups:
    Code:
    /usr/local/directadmin/dataskq d200
    This will create all backups in /home/admin/admin_backups, assuming there is enough of a system left to do so.

    The command to create a backup for just a single User is:

    Code:
    echo "action=backup&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&owner=admin&select%30=testuser&type=admin&value=multiple&when=now&where=local" >> /usr/local/directadmin/data/task.queue
    where testuser is the account you're backing up, by admin.

    Along the same lines, to restore a single User, the command is:

    Code:
    echo "action=restore&ip%5Fchoice=file&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&owner=admin&select%30=user%2Eadmin%2Etestuser%2Etar%2Egz&type=admin&value=multiple&when=now&where=local" >> /usr/local/directadmin/data/task.queue
    where user%2Eadmin%2Etestuser%2Etar%2Egz is the name of the file being restored. Replace periods with %2E (hex value). Note that you can also use the testuser%2Etar%2Egz format as well, either will work. This restore specifes to use the IP stored in the backup file for the restore. If you want to specify the IP to restore him to (assuming his account doesn't exist yet), then you'd set ip_choice=select&ip=1.2.3.4 instead of ip_choice=file.

  2. #2
    Join Date
    Jan 2010
    Location
    EGYPT
    Posts
    2
    Thank you man

Similar Threads

  1. How to create full backup?
    By bigu_c in forum VPS Hosting
    Replies: 12
    Last Post: 07-04-2008, 07:51 PM
  2. Trying to restore a RAQ backup from command line
    By iisv in forum Dedicated Server
    Replies: 1
    Last Post: 06-24-2005, 03:40 PM
  3. How to take full backup of server from command prompt!!
    By atul in forum Hosting Security and Technology
    Replies: 5
    Last Post: 04-30-2004, 02:12 AM
  4. Add accounts through Command Line
    By ClusterMania in forum Hosting Security and Technology
    Replies: 11
    Last Post: 06-19-2002, 06:32 PM
  5. How to create DNS zones in Win NT from command line
    By mac in forum Hosting Security and Technology
    Replies: 8
    Last Post: 11-27-2000, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •