How can I restore configuration files?


I have noticed on a few machines in which my application's user.config file is somehow becoming corrupted and is empty when opening. I can't seem to figure out why this is happened. Is there a common thing that would cause this? Any way to safely prevent this?

My second question is how to do I restore the state? I catch the exception and delete the user.config file, but I cannot find a way to restore the configuration without restarting the application. Everything I do on the Properties object causes the following error:

"Configuration system failed to initialize"

Reset, Reload, and Upgrade all do nothing to solve the problem.

Here is my code for deleting after exception:

catch (System.Configuration.ConfigurationErrorsException ex) { string fileName = ""; if (!string.IsNullOrEmpty(ex.Filename)) fileName = ex.Filename; else { System.Configuration.ConfigurationErrorsException innerException = ex.InnerException as...
0 0

In Debian Squeeze — at least —, we also can do it this way, after su — or sudo for Ubuntu —

aptitude install -o Dpkg::Options::=--force-confmiss mysql-server

This will care for the dependencies of mysql-server and reset all the missing conf files of the lot, including mysql-common. Conflicting (remaining) files will be prompted out to be kept or reset.

Unfortunately, there is a bug in aptitude, and

aptitude purge -o Dpkg::Options::=--force-all mysql-server

will not work. So we have to do it one by one with

dpkg --force-all --purge mysql-common mysql-server mysql-client …

This will remove any config file, original or modified, but custom files will be preserved, with an onscreen message. Note, by the way, that dpkg also recognizes --force-confnew and --force-confold options.

To get mysql-server dependencies' list print on screen :

aptitude --simulate remove...
0 0

There are two ways to restore the backup. The preferred method is with the .unf file generated by backup settings. Alternatively if you have a copy of the /data directory that will allow recovery too.

If you have the .unf (backup) file you can either restore from an active controller (Settings>Admin>Restore) or from the first page of the setup wizard (Browse near the bottom).


If you have the original /data folder (all subfolders and contents inclusive), you can

stop the controller make sure java and mongod are not running (on Windows mongod is rather persistent, so it's best to perform the following steps in Safe Mode) copy the new keystore (found in new /data directory) file to the old backup /data directory, overwriting the old one delete the new data directory copy the old /data directory to the new UniFi installation restart the controller

--Data folder locations

Vista+: C:\Users\username\Ubiquiti UniFi\data
XP: C:\Documents...

0 0

Always backup the configuration of your Opengear device after making significant changes and before performing a firmware upgrade.

Configuration backups can be saved remotely, e.g. to a server, or saved to locally attached USB mass storage.

For information on the OPG backup file format, refer to this article.

To begin, login to the Opengear CLI and root, or an admin group user and become root with:

sudo -s

Config backup commands

This config command exports configuration in OPG format:

config -e /working/dir/filename.opg

.. and this command imports:

config -i /working/dir/filename.opg

Note: See the warning in Gotchas below, regarding importing after a recent factory erase.

Alternative 1. Use a temporary working directory

You may use RAM (tmpfs mounted under /var/tmp/) as your working directory, e.g.:

config -e /var/tmp/my-backup.opg

Before doing so, check there is available space. Use this command to display how...

0 0

Jenkins stores its files in the JENKINS_HOME directory (which is where ever you want it to be).

This directory can be in source control if you like. If you do this, make good use of .gitignore so you don’t save the build artifacts. This allows all of the jenkins config files (passwords, jobs, etc) to be saved and versioned.

This is also completely transparent to Jenkins, since the backup operations function at the operating system level. To restore a previous version, shut down the jenkins container in Tomcat / JBoss (or whatever you are using) then perform any checkouts / revert / etc. operations needed.

When the home directory is at the correct state, then turn on the jenkins container and you are set to...

0 0

Back Up Section

The following file types can be saved as backups from the phone's web user interface:

.cfg Config File .xml XML File

Choose the Config File type if you want the smaller of the two.

Step 1

Determine the IP Address of the Phone by clicking the Help button on your phone. Then click the IPAdr soft key to get the IP Address of the Phone.

Step 2

Launch a web browser and enter that ip address into the Address bar and click enter.

Step 3

Click the Settings link, you’ll find it located under the Status Category in the Vertical navigation links section on the left side of the web page.

At the top of the Settings page you’ll have three options to save the Configuration File. Click the type you prefer to save and store it in a location that you can retrieve from, usually it's fine to save the differences only.

That completes the steps necessary to Back Up a snom phone...

0 0

Routers often get upgraded or swapped out for a number of reasons. This document provides the user with some basic steps to migrate the configuration from an existing router to a new router.


Before you use the information in this document, make sure that you meet these requirements:

Access to a Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) server.

Connectivity - Routers must be able to access the FTP or TFTP server. Use the ping command to verify connectivity.

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.


Refer to Cisco Technical...

0 0

Apache is controlled by a series of configuration files: httpd.conf, access.conf. and srm.conf (there's actually also a mime.types file, but you have to deal with ...

Learn to edit the php.ini file to suit your needs. This configuration file lets you alter many aspects of PHP's behavior, including setting file paths and directories ...

The following VB.NET code from an ASP.NET Web form encrypts the connectionStrings section of the file: Public Sub Page_Load() Dim config As Configuration

All .NET applications maintain their information in an XML-based configuration file. Typically, this .config file exists in the same directory as the application's...

0 0