How to reinstall Jessie without loosing files?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
How can I reinstall Jessie without loosing files and already configured
applications? I am a Linux beginner and have my Raspi running for a long
time but it seems that it gets more and more corrupted. It does not load
any updates anymore for weeks although I did not installed anything.

I use the Raspi for Resilio sync and Nextcloud. There are more than 26
GB data on the card for syncing. I won't setup the programs again
because I had to setup connected remote computers as well (security keys
for Resilio). This would cause endless resyncing even when I manually
copy the files to the Raspberry Pi. I would like to avoid this.

Therefore, is it possible to replace the running operating system for a
fresh one and keep the configurations and data of the programs?

Steffen

Re: How to reinstall Jessie without loosing files?
On 29/01/17 13:52, Steffen Bendix wrote:
Quoted text here. Click to load it

Put them on a double leash?

--  
Truth welcomes investigation because truth knows investigation will lead  
to converts. It is deception that uses all the other techniques.

Re: How to reinstall Jessie without loosing files?
On Sun, 29 Jan 2017 14:52:14 +0100, Steffen Bendix wrote:

Quoted text here. Click to load it
The following link explains how I do clean restores for Redhat Fedora  
systems:

http://www.libelle-systems.com/free/linux/easier_upgrades.html

The same approach should work for a standard Raspbian installation except  
that /home is just another top-level directory in the main ext3  
partition. So, the clean install will overwrite /home with its default  
content and after its complete you'll have to put it back the way it used  
to be by overwriting it with the contents of your latest backup, which  
will be quite slow.

Your back up scheme should keep at least two copies of /home and its  
subdirectories, and you may also want to keep backup copies of /etc. so  
you can look at modified configuration files in the backups and/or  
compare them with the version set up by the clean install instead of  
scratching your head while trying remember what changes you've made to  
them.

I use two USB-attached external hard drives for backups and keep them in  
a fire safe, though there's no reason why you shouldn't use SD cards in  
place of hard drives for this. I use two hard drives so that there is  
ALWAYS a backup copy in the firesafe with the door closed. This is  
protection against the disk being used to make the most recent backup  
getting corrupted by a bad backup, fried by a mains spike or otherwise  
destroyed.

I use rsync to make the backups. There's no reason you shouldn't use tar  
or another program that can copy a complete directory tree, except that:

- rsync is much faster because it does the minimum work needed to make
  the backup copy identical to the directory tree its copying, i.e. it
  deletes copies of files that you got rid of, adds copies of new files
  and copies files that have been changed. It takes about the same time
  as tar to make each of the initial backup copies but after that its
  a lot quicker.  

- don't use zip. Its fine for exchanging files with other operating
  systems, but as a backup its deficient because it can scramble
  permissions and may not deal correctly with symbolic and hard links.
  

--  
martin@   | Martin Gregorie
gregorie. | Essex, UK
We've slightly trimmed the long signature. Click to see the full one.
Re: How to reinstall Jessie without loosing files?
On 29/01/2017 13:52, Steffen Bendix wrote:
Quoted text here. Click to load it

Backup your home directory which contains all the user application  
configuration, and restore that on to a new card containing a fresh  
install of the OS. Reinstall applications, and for any system config  
files that you had to manually modify, such as those in /etc, take a  
copy, but manually reapply the changes to the new OS.

Quoted text here. Click to load it

For that type of use don't rely on the SD card, they will die after a  
finite period of time. Get yourself a modestly sized (64GB or 120GB) SSD  
and keep the OS and data on that, it will be far more reliable. Just use  
a small SD card to hold the boot partition, you can find the  
instructions on how to do this on many websites.

---druck


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Site Timeline