1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Back Up and Migrate Your Linux Configuration Files

Discussion in 'Linux - General discussion' started by ireland, Aug 9, 2014.

  1. ireland

    ireland Active member

    Joined:
    Nov 28, 2002
    Messages:
    3,720
    Likes Received:
    13
    Trophy Points:
    68
    How to Back Up and Migrate Your Linux Configuration Files


    Linux applications store their settings in hidden folders inside each user account’s home folder. This makes application settings much easier to back up and restore than they are on Windows, where settings are scattered across the registry and system folders.

    Whether you just want a backup copy of your settings, or if you’re moving to a new Linux distribution or another PC, you can easily create a copy of your application settings and take them with you.
    View Your User Account’s Configuration Files

    First, locate your user account’s configuration files. Open your Linux distribution’s file manager to your home folder and activate the “Show Hidden Files” option in your Linux desktop’s file manager.

    For example, on Ubuntu, open the Nautilus file manager and it will go straight to your home folder by default. Click the View menu and select Show Hidden Files.

    ubuntu-nautilus-file-manager-show-hidden-files

    You’ll see many different files and folders, all of them beginning with a period. That’s how you hide files and folders on Linux — just rename them so that their name starts with a . character. File managers will hide them by default so they don’t get in the way.

    hidden-configuration-folders-in-ubuntu-home-folder
    Locate an Application’s Settings Folder

    Different applications often have their own folder under your home directory. For example, Pidgin stores all its settings, log files, and other data in the .purple directory. Firefox stores its installed extensions, ache, settings, and other data in the .mozilla directory.

    Some applications have folders under the .config folder instead. Click around a bit and you should find where an application you want to back up stores its configuration files.

    mozilla-firefox-configuration-files-on-linux

    Some applications — particularly GNOME applications — use the older “Gconf” or the newer “Dconf” systems to store settings. Gconf settings are stored in .gconf, while dconf settings are stored in .config/dconf. Copy these entire folders and all the application settings contained in gconf and dconf will come with you to a new PC.

    You could migrate an individual application’s settings from Gconf or Dconf using the gconftool or dconf commands. These commands allow you to dump parts of Gconf or Dconf to a file and restore them on another PC.

    dconf-folder-on-ubuntu
    Back Up and Restore an Application’s Settings

    To back up an application’s settings, just copy its configuration folder to a USB drive, external hard drive, cloud storage folder, or any other storage location. You can also right-click a folder in most file managers and create an archive file from it — the archive file can be more easily emailed, uploaded, and moved around.

    Be sure to close an application before backing up its configuration settings. This will ensure the application exits and saves its settings properly, leaving a clean settings folder for your new Linux distribution.

    copy-pidgin-on-linux-settings

    Restore an application’s settings by placing its folder in your user account’s home folder on another Linux system. This is ideal when you’re reinstalling Linux and want to restore a crucial application’s settings, or just when you’re moving to a new Linux PC and want to keep your settings.

    To be safe, you should delete or rename the existing configuration files before migrating your old ones over. For example, if you wanted to move your Firefox settings to a different Linux distribution, you should first delete the .mozilla directory on that Linux distribution before copying your old .mozilla folder over. This ensures you don’t have a mix of files from two different configuration folders

    (If you ever want to erase a Linux application’s settings and start fresh, this is how you do it — head to your home folder, view hidden files, and delete the application’s configuration folder).

    delete-linux-program's-configuration-files

    You don’t have to back up the files ahead of time, either — if you still have access to a drive with Linux installed on it, you can connect the drive to your new computer, browse to your user account’s home folder, and copy the folder over.

    To migrate all your settings to a new Linux system, just copy over every file beginning with a . in your home folder — you can copy over every other file beginning with a . character, too. This will work best if you’re moving to a system running the same Linux distribution — for example, from a computer running Ubuntu 14.04 to a different computer running Ubuntu 14.04.
    Easily Back Up All Your Settings

    THE FUN PART
    GO HERE TO READ IT ALL


    http://www.howtogeek.com/194342/how-to-back-up-and-migrate-your-linux-configuration-files/
     
  2. ps355528

    ps355528 Regular member

    Joined:
    Aug 17, 2010
    Messages:
    1,005
    Likes Received:
    11
    Trophy Points:
    48
    there is a simpler way (sys admin stuff) involving cp *.conf -r .. but use with care because every linux system is different.. even supposedly identical systems set up by the same person (home directory has different name etc). All in all unless you are doing something with a server it's probably easier to just copy the /home directory in it's entirety to the other drive, because it will only over write identical named files .. and you can even specify "newer" and various other copy variables. Linux is good at this, but you have to know some shell commands :D

    Please note.. in the bad old days we used to join video and audio files with cp file1 file2 > file3 .. this joined them.. it's fantastic for joining together old word processor files ;) Note the similarity to the old DOS copy command.
     

Share This Page