Recover running configuration of OpenSIPs

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Recover running configuration of OpenSIPs

Muhammad Shahzad
Hi,

Is there anyway to get currently loaded opensips.cfg in a running instance of opensips? i have accidently lost the opensips configuration of a running production server? The backup of configuration file is bit old and does not contains most recent changes so i am worried next time we restart opensips we may loose some important changes in configuration file.

I know its a bit stupid / awkward situation but any help will be highly appreciated.

Thank you.


--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

alexandre Moutot
Hi,

Have you try to recover your file from your FS ?

Regards,

M. A.

----- Original Message -----

> From: "Muhammad Shahzad" <[hidden email]>
> To: "OpenSIPS users mailling list" <[hidden email]>
> Sent: Tuesday, November 6, 2012 3:57:33 PM
> Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
> Hi,
>
>
> Is there anyway to get currently loaded opensips.cfg in a running
> instance of opensips? i have accidently lost the opensips
> configuration of a running production server? The backup of
> configuration file is bit old and does not contains most recent
> changes so i am worried next time we restart opensips we may loose
> some important changes in configuration file.
>
>
>
> I know its a bit stupid / awkward situation but any help will be
> highly appreciated.
>
>
> Thank you.
>
>
>
>
> --
> Muhammad Shahzad
> -----------------------------------
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: +49 176 99 83 10 85
> MSN: [hidden email]
> Email: [hidden email]
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

Muhammad Shahzad
No, file was not removed, but only changed with default opensips configuration file that comes with its source code, so i guess any file system utility won't help, specially when using EXT3 FS.

To avoid such situation in future i suggest to create backup configuration file from start up script i.e. /etc/init.d/opensips, e.g. whenever we run "/etc/init.d/opensips start", it should make a copy of opensips.cfg somewhere safe like,

cp -arvf /usr/local/opensips/opensips.cfg /var/run/opensips/opensips.cfg-<current-date-time>

This backup is good not only for recovery but also to see what went to production when..

But for current situation, it seems i am helpless.

Thank you.


On Tue, Nov 6, 2012 at 4:22 PM, alexandre Moutot <[hidden email]> wrote:
Hi,

Have you try to recover your file from your FS ?

Regards,

M. A.

----- Original Message -----
> From: "Muhammad Shahzad" <[hidden email]>
> To: "OpenSIPS users mailling list" <[hidden email]>
> Sent: Tuesday, November 6, 2012 3:57:33 PM
> Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
> Hi,
>
>
> Is there anyway to get currently loaded opensips.cfg in a running
> instance of opensips? i have accidently lost the opensips
> configuration of a running production server? The backup of
> configuration file is bit old and does not contains most recent
> changes so i am worried next time we restart opensips we may loose
> some important changes in configuration file.
>
>
>
> I know its a bit stupid / awkward situation but any help will be
> highly appreciated.
>
>
> Thank you.
>
>
>
>
> --
> Muhammad Shahzad
> -----------------------------------
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085">+49 176 99 83 10 85
> MSN: [hidden email]
> Email: [hidden email]
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

SamyGo
Wish you best of Luck. 

The idea of copying/backing up at init.d script is good +1. Add a remote configuration server for it to be sure that it doesn't get modified by anyone on OpenSIPS server.

Cheeers
Sammy 



On Tue, Nov 6, 2012 at 9:25 PM, Muhammad Shahzad <[hidden email]> wrote:
No, file was not removed, but only changed with default opensips configuration file that comes with its source code, so i guess any file system utility won't help, specially when using EXT3 FS.

To avoid such situation in future i suggest to create backup configuration file from start up script i.e. /etc/init.d/opensips, e.g. whenever we run "/etc/init.d/opensips start", it should make a copy of opensips.cfg somewhere safe like,

cp -arvf /usr/local/opensips/opensips.cfg /var/run/opensips/opensips.cfg-<current-date-time>

This backup is good not only for recovery but also to see what went to production when..

But for current situation, it seems i am helpless.

Thank you.


On Tue, Nov 6, 2012 at 4:22 PM, alexandre Moutot <[hidden email]> wrote:
Hi,

Have you try to recover your file from your FS ?

Regards,

M. A.

----- Original Message -----
> From: "Muhammad Shahzad" <[hidden email]>
> To: "OpenSIPS users mailling list" <[hidden email]>
> Sent: Tuesday, November 6, 2012 3:57:33 PM
> Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
> Hi,
>
>
> Is there anyway to get currently loaded opensips.cfg in a running
> instance of opensips? i have accidently lost the opensips
> configuration of a running production server? The backup of
> configuration file is bit old and does not contains most recent
> changes so i am worried next time we restart opensips we may loose
> some important changes in configuration file.
>
>
>
> I know its a bit stupid / awkward situation but any help will be
> highly appreciated.
>
>
> Thank you.
>
>
>
>
> --
> Muhammad Shahzad
> -----------------------------------
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
> MSN: [hidden email]
> Email: [hidden email]
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

Ovidiu Sas
In reply to this post by Muhammad Shahzad
Just use git to track down your changes.

On Tue, Nov 6, 2012 at 11:25 AM, Muhammad Shahzad
<[hidden email]> wrote:

> No, file was not removed, but only changed with default opensips
> configuration file that comes with its source code, so i guess any file
> system utility won't help, specially when using EXT3 FS.
>
> To avoid such situation in future i suggest to create backup configuration
> file from start up script i.e. /etc/init.d/opensips, e.g. whenever we run
> "/etc/init.d/opensips start", it should make a copy of opensips.cfg
> somewhere safe like,
>
> cp -arvf /usr/local/opensips/opensips.cfg
> /var/run/opensips/opensips.cfg-<current-date-time>
>
> This backup is good not only for recovery but also to see what went to
> production when..
>
> But for current situation, it seems i am helpless.
>
> Thank you.
>
>
> On Tue, Nov 6, 2012 at 4:22 PM, alexandre Moutot <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> Have you try to recover your file from your FS ?
>>
>> Regards,
>>
>> M. A.
>>
>> ----- Original Message -----
>> > From: "Muhammad Shahzad" <[hidden email]>
>> > To: "OpenSIPS users mailling list" <[hidden email]>
>> > Sent: Tuesday, November 6, 2012 3:57:33 PM
>> > Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
>> > Hi,
>> >
>> >
>> > Is there anyway to get currently loaded opensips.cfg in a running
>> > instance of opensips? i have accidently lost the opensips
>> > configuration of a running production server? The backup of
>> > configuration file is bit old and does not contains most recent
>> > changes so i am worried next time we restart opensips we may loose
>> > some important changes in configuration file.
>> >
>> >
>> >
>> > I know its a bit stupid / awkward situation but any help will be
>> > highly appreciated.
>> >
>> >
>> > Thank you.
>> >
>> >
>> >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

qasimakhan@gmail.com
I think a better way than adding copy command to init script would be to use incron utility. This utility triggers cron jobs based on file system triggers so you can backup a file when it is changed. You can do SVN/Git commit or even do an rsync so whenever you change the file it is automatically backed up.

Regards,
Qasim


On Tue, Nov 6, 2012 at 10:12 PM, Ovidiu Sas <[hidden email]> wrote:
Just use git to track down your changes.

On Tue, Nov 6, 2012 at 11:25 AM, Muhammad Shahzad
<[hidden email]> wrote:
> No, file was not removed, but only changed with default opensips
> configuration file that comes with its source code, so i guess any file
> system utility won't help, specially when using EXT3 FS.
>
> To avoid such situation in future i suggest to create backup configuration
> file from start up script i.e. /etc/init.d/opensips, e.g. whenever we run
> "/etc/init.d/opensips start", it should make a copy of opensips.cfg
> somewhere safe like,
>
> cp -arvf /usr/local/opensips/opensips.cfg
> /var/run/opensips/opensips.cfg-<current-date-time>
>
> This backup is good not only for recovery but also to see what went to
> production when..
>
> But for current situation, it seems i am helpless.
>
> Thank you.
>
>
> On Tue, Nov 6, 2012 at 4:22 PM, alexandre Moutot <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> Have you try to recover your file from your FS ?
>>
>> Regards,
>>
>> M. A.
>>
>> ----- Original Message -----
>> > From: "Muhammad Shahzad" <[hidden email]>
>> > To: "OpenSIPS users mailling list" <[hidden email]>
>> > Sent: Tuesday, November 6, 2012 3:57:33 PM
>> > Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
>> > Hi,
>> >
>> >
>> > Is there anyway to get currently loaded opensips.cfg in a running
>> > instance of opensips? i have accidently lost the opensips
>> > configuration of a running production server? The backup of
>> > configuration file is bit old and does not contains most recent
>> > changes so i am worried next time we restart opensips we may loose
>> > some important changes in configuration file.
>> >
>> >
>> >
>> > I know its a bit stupid / awkward situation but any help will be
>> > highly appreciated.
>> >
>> >
>> > Thank you.
>> >
>> >
>> >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Recover running configuration of OpenSIPs

Anton Kvashenkin
+1 for git

2012/11/7 [hidden email] <[hidden email]>
I think a better way than adding copy command to init script would be to use incron utility. This utility triggers cron jobs based on file system triggers so you can backup a file when it is changed. You can do SVN/Git commit or even do an rsync so whenever you change the file it is automatically backed up.

Regards,
Qasim



On Tue, Nov 6, 2012 at 10:12 PM, Ovidiu Sas <[hidden email]> wrote:
Just use git to track down your changes.

On Tue, Nov 6, 2012 at 11:25 AM, Muhammad Shahzad
<[hidden email]> wrote:
> No, file was not removed, but only changed with default opensips
> configuration file that comes with its source code, so i guess any file
> system utility won't help, specially when using EXT3 FS.
>
> To avoid such situation in future i suggest to create backup configuration
> file from start up script i.e. /etc/init.d/opensips, e.g. whenever we run
> "/etc/init.d/opensips start", it should make a copy of opensips.cfg
> somewhere safe like,
>
> cp -arvf /usr/local/opensips/opensips.cfg
> /var/run/opensips/opensips.cfg-<current-date-time>
>
> This backup is good not only for recovery but also to see what went to
> production when..
>
> But for current situation, it seems i am helpless.
>
> Thank you.
>
>
> On Tue, Nov 6, 2012 at 4:22 PM, alexandre Moutot <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> Have you try to recover your file from your FS ?
>>
>> Regards,
>>
>> M. A.
>>
>> ----- Original Message -----
>> > From: "Muhammad Shahzad" <[hidden email]>
>> > To: "OpenSIPS users mailling list" <[hidden email]>
>> > Sent: Tuesday, November 6, 2012 3:57:33 PM
>> > Subject: [OpenSIPS-Users] Recover running configuration of OpenSIPs
>> > Hi,
>> >
>> >
>> > Is there anyway to get currently loaded opensips.cfg in a running
>> > instance of opensips? i have accidently lost the opensips
>> > configuration of a running production server? The backup of
>> > configuration file is bit old and does not contains most recent
>> > changes so i am worried next time we restart opensips we may loose
>> > some important changes in configuration file.
>> >
>> >
>> >
>> > I know its a bit stupid / awkward situation but any help will be
>> > highly appreciated.
>> >
>> >
>> > Thank you.
>> >
>> >
>> >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users