LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Keeping Debian 8.7 configuration after changing Hard Disk ... .. . (https://www.linuxquestions.org/questions/debian-26/keeping-debian-8-7-configuration-after-changing-hard-disk-4175601714/)

lin66uxx 03-14-2017 04:50 AM

Keeping Debian 8.7 configuration after changing Hard Disk ... .. .
 
Dear all,

I need to replace my Hard disk because it has more than 200 bad sectors which were only 4 few days ago, anyway, I want to know how do I keep all the configurations I have currently?

1. firefox passwords and bookmarks and history and addons ?
2. gnome configurations ?
3. other configuration files such as those for emacs and Terminal ?
4. list of application that I installed manually on my laptop so that I can reinstall them when needed?

Is there any application/tool provided by gnome that can backup all of debian installed on my laptop into DVDs??

This is my first time I need to do a backup of my system, so sorry for too much questions.

Thanks for any quick and informative answer,

wpeckham 03-14-2017 06:14 AM

In general, once you have exploding numbers of bad sectors is a bit late to decide you need a backup. Next time, start sooner: right after you install the system might be about right.

That said...

How much disk is currently in use, and how large is it in total, and how is it organized?
There are tools for file backups, file system backups, partition backups: what is best will depend upon your starting point, tools, and resources available.

Speaking of resources, is this your only machine? (Advantage is you have another you can back up onto.) Have you any storage devices other than writable DVD media? Can you afford an external storage device (USB3 disk enclosure and drive perhaps)?

Using FIREFOX and Mozilla Sync to cone your settings to multiple machines, LASTPASS to centralize your credential management, XMARKS or Sync to clone your bookmarks gives you a certain confidence that I recommend. Recording your main drivers and configuration in a "continuity" document (paper, digital online (see google drive, dropbox, one drive, etc. there are many), or on secure portable media (not a usb key, they go bad often and without warning) can be of value.

The Continuity document is something I ALWAYS recommend for servers, but is generally overkill for laptops or workstations. I have been known to install a new OS on a whim, sometimes every week for a few weeks, until I find what I want to keep. The exact list that you would want to record is very personal and unique to the user based upon the environment and what you DO with your machine. You soon learn what you need to document, and what you can sync and auto-load on demand if you reload often.

lin66uxx 03-14-2017 06:19 AM

Hi,
It is 500GB hard disk, with both debian 8.7 (400 GB) and windows 7 (100GB).

the debian part is 77% free ...

This is my only machine and I can backup either on DVDs or on Google drive(s).

thank you,

Turbocapitalist 03-14-2017 06:29 AM

Avoid 'cloud' services unless you want everything public, or rummaged through by third parties.

You can get a 500GB (or more) USB hard drive quite inexpensively these days from just about any store. I would buy one or two of those for backups.

About the backups, the home directories are the most important.

wpeckham 03-14-2017 06:41 AM

Quote:

Originally Posted by lin66uxx (Post 5683211)
Hi,
It is 500GB hard disk, with both debian 8.7 (400 GB) and windows 7 (100GB).

the debian part is 77% free ...

This is my only machine and I can backup either on DVDs or on Google drive(s).

thank you,

At about 4.7G per DVD that would be a LOT of disks, at best. I cannot recommend backing up the OS to DVD. EITHER (or a USB device) will suffice for backing up smaller things like settings, accounts, and the odd critical folder for a single application.

Even with the paid professional options, Google Drive is going to be a difficult and tight fit for any significant OS backup, not to mention that restore is going to be a lot of 'fun'. To access the backups you will have to have first installed an OS (or run a live image) to get to the backup to start to restore.

Moreover, while you CAN back up and restore Linux, the only Microsoft approved restore starts with a fresh install of Windows (EXACTLY the same version) to the new media and re-register using your key.

I would record carefully, on paper, your selection of software and most critical settings under both operating systems, securing your Windows product and registration keys along with proof of purchase documents, and doing a clean install. (Windows first, then Linux.) Exceptions: if you have RSS or EMAIL settings, archives, and configurations (or other similar sets of data that can be easily restored) I would hunt those down and copy THOSE to media for later use. Creating a paper list of those would be a burdensome task, try to make it easy.


Once you have a working system, consider backups when deciding your next purchase. A NAS device, an external drive, or another machine that can double as a backup server may be of great value when your next drive fails.

HappyTux 03-14-2017 06:42 AM

Quote:

Originally Posted by lin66uxx (Post 5683193)
Dear all,

I need to replace my Hard disk because it has more than 200 bad sectors which were only 4 few days ago, anyway, I want to know how do I keep all the configurations I have currently?

1. firefox passwords and bookmarks and history and addons ?
2. gnome configurations ?
3. other configuration files such as those for emacs and Terminal ?
4. list of application that I installed manually on my laptop so that I can reinstall them when needed?

Is there any application/tool provided by gnome that can backup all of debian installed on my laptop into DVDs??

This is my first time I need to do a backup of my system, so sorry for too much questions.

Thanks for any quick and informative answer,

1, 2 & 3 if only user files changes for them then all that is needed is a backup/copying onto new hard drive of your /home/user_name directory. Preferably into a newly created partition that will be the new location of your /home when doing a fresh install. When you get the new drive attach it to the machine and setup your partitions a no more than 20 or so GB for the / whatever size you are using for your swap then the rest of drive for your /home. Once you have formatted the new /home partition with the file system of your choosing then mount it and cp -Rp /home/user_name /path/to/new/partition/, this will copy all files/directories with the correct permissions recursively to the new partition that are contained in your home directory. When installing the new system you will need to use one of the Expert options either graphical or text choosing a manual partitioning without doing any partitioning you simply choose the partitions you have already created on the new drive with the old disconnected already. You select the new drive partitions and set the use as option to what is needed ie. the / set to partition for that, swap same and the /home set for new one making sure to deselect the format option here so you do not lose your data/settings already copied over. For # 4. you should have done a dpkg --get-selections > /home/user_name/selections.txt before the copying of the data to new partition/drive then after install a cat /home/user_name/selections.txt | dpkg --set-selections and dselect update lastly to install apt-get dselect-upgrade this should result in an identical system to what you had before.

wpeckham 03-14-2017 06:45 AM

Quote:

Originally Posted by Turbocapitalist (Post 5683213)
Avoid 'cloud' services unless you want everything public, or rummaged through by third parties.

You can get a 500GB (or more) USB hard drive quite inexpensively these days from just about any store. I would buy one or two of those for backups.

About the backups, the home directories are the most important.

That was what I was trying to say, but he said it SO much better!

lin66uxx 03-14-2017 02:49 PM

Hi,

I noticed that all of the bad blocks are in the linux partition, I rarely use the windows, only linux, will the bad sector expansion remain in the linux part? can I store important files for me in the windows part?

Thank you,

HappyTux 03-14-2017 05:14 PM

Quote:

Originally Posted by lin66uxx (Post 5683430)
Hi,

I noticed that all of the bad blocks are in the linux partition, I rarely use the windows, only linux, will the bad sector expansion remain in the linux part? can I store important files for me in the windows part?

Thank you,

Once a drive starts to fail it is all down hill from there, eventually the thing is going to just stop working then any files on it are lost.


All times are GMT -5. The time now is 12:47 AM.