Nyheter / Dokumentasjon / Serverpark / DirectAdmin

DirectAdmin

På serverene til NDDesign så kjører vi DirectAdmin som er et admin grensesnitt som inneholder mulighetene for å opprette forhandlere som igjen kan opprette kunder. Her får de tilgang til DNS, Web og Epost bl.a.

Hjelpsomme ting

How to create a full backup of all accounts 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:

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:

/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:

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:

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.