[Spce-user] Permanent Contacts after upgrade from 2.8 to 3.8.6

Robert Cuaresma rcuaresma at telcon.es
Wed May 18 11:45:44 EDT 2016


Hi Alex, 

On server with issue (v3.8.6) I have on backup directory:

# ls -la /var/backup/ngcp-mr3.8.6
drwxr-xr-x 2 root root     4096 May 12 16:42 apt
-rw-r--r-- 1 root root       30 May 12 16:42 db_backup_done
-rw------- 1 root root 24388176 May 12 16:42 db_backup.sql.gz
-rw-r--r-- 1 root root       30 May 12 16:42 db_backup_started
drwx------ 4 root root     4096 May 10 20:38 ngcp-config
-rw-r--r-- 1 root root  1307192 May 12 17:15 upgrade.log

¿It's possible that the table with permanent contacts are here?

¿Can you explain me procedure for restore this backup on database?

Thanks!

Saludos, 
Robert Cuaresma
Dpto. Ingeniería de Clientes 

-----Mensaje original-----
De: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] En nombre de Alex Lutay
Enviado el: miércoles, 18 de mayo de 2016 16:06
Para: spce-user at lists.sipwise.com
Asunto: Re: [Spce-user] Permanent Contacts after upgrade from 2.8 to 3.8.6

Dear Robert,

On 05/18/2016 02:45 PM, Alex Lutay wrote:
> Sure, the fix is already on review. There is one place left with root 
> user there for 3 years, while all the code uses sipwise user.

I have two good and one bad news.

Good news #1:

The situation is clear here. And the issue with root user is really the problem + one more unsafe state handling due to missing "set -e". The fix will be prepared and released without rush.

The issue happens here ONLY:
 - if root user has a password
 - if some subscriber has more the one permanent registrations.

Bad news:

The permanent registrations is lost due to command:
> echo "DROP TABLE IF EXISTS location_perm;"
which is executed earlier the schedule due to wrong user 'root' in use.

Good news #2:

We are doing backups! :-)

You can find it on your server:
zless /var/backup/ngcp-mr3.8.6/db_backup.sql.gz
(please make a copy first).

There is content of location before the upgrade, and there is permanent registrations you have (with expires="1970-01-01 01:00:00").

So you have to recover them manually
extracting values "username domain contact path"
and insert in new kamailio using:

> ngcp-sercmd proxy ul.add location "${username}@${domain}" "${contact}" 
> 0 1.00 "${path}" 0 0 4294967295

Feel free to ask if you need further assistance here.
We are sorry for inconvenience here.
Thank you for the bugreport.

--
Alex Lutay
_______________________________________________
Spce-user mailing list
Spce-user at lists.sipwise.com
https://lists.sipwise.com/listinfo/spce-user



More information about the Spce-user mailing list