How to add user records using CLI

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

How to add user records using CLI

Postby pyke » Fri Nov 04, 2016 2:14 am

hi guys... can you tell me how to add users using cli and how to find it in the directory.

Thanks
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: How to add user records using CLI

Postby mflorell » Fri Nov 04, 2016 5:17 am

We don't recommend doing that. Either use the web admin or the Non-Agent API to add users.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: How to add user records using CLI

Postby pyke » Sun Nov 06, 2016 9:13 pm

thanks for the info... but how will you copy all the users from your old server to the new servers?

Thanks again
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: How to add user records using CLI

Postby mflorell » Sun Nov 06, 2016 9:37 pm

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.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: How to add user records using CLI

Postby pyke » Wed Nov 09, 2016 3:48 am

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
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: How to add user records using CLI

Postby mflorell » Wed Nov 09, 2016 6:43 am

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
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 98 guests