Page 1 of 1
How to add user records using CLI
Posted:
Fri Nov 04, 2016 2:14 am
by pyke
hi guys... can you tell me how to add users using cli and how to find it in the directory.
Thanks
Re: How to add user records using CLI
Posted:
Fri Nov 04, 2016 5:17 am
by mflorell
We don't recommend doing that. Either use the web admin or the Non-Agent API to add users.
Re: How to add user records using CLI
Posted:
Sun Nov 06, 2016 9:13 pm
by pyke
thanks for the info... but how will you copy all the users from your old server to the new servers?
Thanks again
Re: How to add user records using CLI
Posted:
Sun Nov 06, 2016 9:37 pm
by mflorell
Backup your database using the ADMIN_backup.pl script. This can create a settings-only SQL file that you can import into a new system.
Re: How to add user records using CLI
Posted:
Wed Nov 09, 2016 3:48 am
by pyke
thanks again.... how will you import it? do you have steps on how to create the database backup and also on the steps on importing it?
Thanks again
Re: How to add user records using CLI
Posted:
Wed Nov 09, 2016 6:43 am
by mflorell
Here's an example of a full restore(you can skip the sections for the tar.gz files that you don't have from your backup):
- ls -lat /var/log/astguiclient/archive/
- cd /var/log/astguiclient/archive/
- tar xvfz 192.168.198.5_ALL_0.tar.gz
- cd var/log/astguiclient/archive/
- mv 192.168.198.5* /
- cd /
- ls -lat
- tar xvf 192.168.198.5_VOICEMAIL_0.tar
- tar xvf 192.168.198.5_CONF_0.tar
- tar xvf 192.168.198.5_BIN_0.tar
- tar xvf 192.168.198.5_LINUX_0.tar
- tar xvf 192.168.198.5_SOUNDS_0.tar
- (check for other tar files if you used other backup options)
- gunzip 192.168.198.5asterisk0.gz
- mysql asterisk
- \. 192.168.198.3asterisk0
- quit