Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    backup program/os settings in linux

    I need to format and repartition my harddrive. Is there an easy way I can backup JUST my program/os settings?

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    Well, you'll need to store it somewhere you're not formatting...

    One option is just to move necessary files to an external medium, such as a CD or a USB key. This is easily done manually (a la "cp /etc/* /mnt/usb").

    The other option is just to move it to a different partition. You can also do this manually, or you could use a utility. I've personally used rsnapshot to back up some stuff of mine when I was gonna try some testing apps in Gentoo.

    Basically, tell it to store everything on a different hard drive instead of the default /.snapshots/

    rsnaphsot is available at:

  3. #3
    This command line stuff is starting to drive me crazy.

    My last copy of Linux died on me because of a simple mistake. I installed a new copy of Linux so I could get my files and settings from the old copy.

    Are my settings files located in /home/[username]? If so, could I just zip up /home/[username] using ark, and then uncompress that zip file into my new account? Will this copy my old settings to my new account?

    I've been waiting for 2 days now on another forum for someone to help me with this problem. Thank you so much for taking the time to respond to this question.

  4. $spacer_open
  5. #4
    Linux Engineer
    Join Date
    Apr 2005
    I recently tried to zip / tar all the stuff on the /home directory, it gave me an error.
    And when you reinstall: give /home its own partition, that will save you a lot of trouble when upgrading/reinstalling in the future!

    As for your program settings: most settings are stored in your home directory, in hidden folders. Most applications are installed in /usr/bin I think (not sure though), you will have to reinstall them all again I fear.
    Debian Jessie x86_64 & armhf :: LibreELEC is the solution for your Linux-based HTPC setups.

  6. #5
    Backing up your settings isn't impossible. I just need to find an easy way to do it.

  7. #6
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    The Filesystem Hierachy Standard contains explanations of the Linux filesystem:

  8. #7
    Quote Originally Posted by Cabhan
    The Filesystem Hierachy Standard contains explanations of the Linux filesystem:
    Doesn't ANYONE have a simple command line that I can use to backup the program/software settings in my Home directory? Why does everything with Linux have to be a chore or a 50 page manual? I'm not a programmer. I don't want to be a programmer. I don't want to learn about the gears and bolts that make an operating system work. I just want to backup my settings so I can reinstall Linux. I do enough thinking at my day job. An operating system should be helpful. It shouldn't be a god damn pain in the ass!

  9. #8
    Just Joined! JoeB's Avatar
    Join Date
    Nov 2004
    Elburn, Illinois
    You sound frustrated, and that is understandable as there is a significant learning curve associated with Linux. I can relate, I still have marks on my forehead from my most recent keyboard pounding.

    I don't want to learn about the gears and bolts that make an operating system work.
    Well, to put it simply, that is pretty much exactly what is required of using Linux effectively.

    If you could be more specific about what programs and settings you want to save off before reinstalling, we may be able to help. As for the future, I personally would recommend a product called Acronis. I use it to take a snapshot image of my Linux drive (all partitions) when all is stable. Then I can start 'doing stuff', and if I fsck it up, I just restore. This product isn't free, but I think its worth the cost.

    Don't give up, the folks here are very helpful.

  10. #9
    JoeB, I hate using computers more than anything. I switched professions just so I wouldn't have to be around a computer as much.

    I've been trying to get some help on this for the last 2 days now. I've been to 4 different forums and I have yet to find a simple and clear answer. Please note, I am a 'NEWBIE'. I don't know about programming, much about terminal code, etc - etc.

    I know my program settings are located in hidden folders inside of my Home directory. My question is, how can I archive (zip up) those settings into a file so that I can save them for later use?

    * I only want to backup the program settings (program preferences, firefox bookmarks, etc - etc).
    * I don't want to backup everything in the account.
    * My files are located in an copy of Linux that won't boot.
    * I am accessing those files from another copy of Linux.
    * Both copies are Mandrake 10.1.

    Please, if you or anyone knows the command line or whatever to make this work, please - please share it with me so I can get back on track with my work and not have to think about this anymore.

  11. #10
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    Alright, well first off, Linux is a fairly steep learning curve. if you truly want to get the most out of it, you need to learn how it works.

    That said, I understand your frustration, so allow me to explain a few things and help you out.

    Firefox bookmarks, for starters. If you can find some way to boot up Firefox, you can go to Bookmarks --> Manage Bookmarks and export them as an HTML file. You can then import that HTML file into Firefox in another computer, distro, etc. So those are pretty easy.

    As far as settings and documents, these are generally stored under your home directory. To back these up is fairly simple. For these instructions, I will assume that you have a USB key. If you do not, let me know what sort of backup media you have, and I can walk you through that.

    Now then, plug the USB key into a USB port and do the following in the terminal:

    mkdir /mnt/usb
    mount /dev/sda1 /mnt/usb
    mkdir /mnt/usb/backup
    cp -R * /mnt/usb/backup/
    cp -R .* /mnt/usb/backup/
    umount /mnt/usb
    If that last command fails and tells you that the device is busy, then run:

    fuser -k /mnt/usb
    umount /mnt/usb
    You may now unplug your device.

    What you have just done is copy everything in the home directory, such as program settings, documents, and the like into a directory called "backup" on your USB key.

    Alrighty. I hope that helps, and let us know if you have any problem with that.


    After looking at some stuff, I think that you can create a zipped package with your home directory by running this:

    tar -cjf home_backup.tar.bz2 /home/<USER>
    <USER> obviously is your user's name.

    This command will create a file called home_backup.tar.bz2 that contains the contents of your home directory. You can then transfer it anywhere you want, and it can be unzipped by running:

    tar xvfj home_backup.tar.bz2
    Hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts