Page 1 of 1

What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 25th, '17, 16:58
by linuxbrad
Hello,

As a corollary to my previous question (https://forums.mageia.org/en/viewtopic.php?f=7&t=11950&p=69776#p69776), I am wondering what should I back up on my Mageia 5 filesystem in order to make it as painless as possible to restore my settings, applications etc. once I've done a clean install of Mageia 6. I'd like to do a clean install so that I can create a larger partition for my / partition which is currently only 12 GB on a 1 TB hard drive:

Code: Select all
bradfonseca@localhost ~]$ df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G  194M  3.7G   5% /dev/shm
tmpfs           3.9G  900K  3.9G   1% /run
/dev/sda1        12G  9.8G  1.4G  89% /
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           3.9G  480K  3.9G   1% /tmp
/dev/sda6       902G  130G  772G  15% /home
tmpfs           790M   16K  790M   1% /run/user/500


Can someone point me to a list of what I should back up and what I should do after my install to restore my settings and applications?

Thanks,

Brad

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 15:47
by kernow
You could just select the install option on M6, then when it gets to the partition section, select to format everything apart from the /home partition.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 16:09
by linuxbrad
You could just select the install option on M6, then when it gets to the partition section, select to format everything apart from the /home partition.


I need to resize /home (/dev/sda6) to give some additional space to / (/dev/sda1) which I find too small for my needs. I'm not sure your solution will work for me.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 17:23
by kernow
Back up /home to some external media, do a fresh install and get your partitions sizes as you want them, then either copy or rsync the stuff from your /home backup media.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 22:13
by benmc
resize your / partition using gparted.
backup your /home partition first.
you need to do this from a "live" environment, not an installed system.
So, download and burn a live system to bootable media and then boot to the media. resize the /home to be slightly smaller, then upsize / partition using gparted from the live desktop.
this will take a while. make a cup of tea or something
then boot to Mga6 installer and as Kernow suggested, choose custom disk partitioning, format only the now larger / partition and complete the install.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 22:46
by jiml8
In your situation, I would backup everything using rsync to some external medium. I would then repartition my drive, reinstall grub, and rsync everything back into place.

In fact, this is how I do it when I must replace a drive due to a failure. Works easily.

After rsyncing everything back and making sure it works, I then would proceed with the upgrade.

If you really want to save your settings and install clean, save all of /home. Also save all of /etc. You probably should also save /lib/systemd (some config stuff will be hiding in there), and /var/lib. If you are running a webserver, don't forget /var/www.

After the clean install, restore /home to get all your desktop settings, emails, and so forth back. Selectively restore files from /etc to recover package settings. /var/lib will contain, for instance, your mysql databases and an assortment of other config stuff for various packages and system information.

/lib/systemd will contain some odds and ends of config stuff, that you may or may not need. Better to have it and not need it than not have it and need it.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 27th, '17, 23:34
by Ken-Bergen
In your situation I would use gparted from a Live session.

Shrink /dev/sda6 "/home" by ten to thirty GB then move it toward the end of the disk.

Move /dev/sda5 "/swap" toward/into the empty space created by moving "/home"

Expand /dev/sda1 "/" into the empty space created by moving "/swap"

Reboot into a system with lots of space to do an upgrade.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 28th, '17, 02:05
by morgano
...and on the new system, consider using LVM so you can resize in the future :)

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 28th, '17, 04:06
by jiml8
Ken-Bergen wrote:In your situation I would use gparted from a Live session.

Shrink /dev/sda6 "/home" by ten to thirty GB then move it toward the end of the disk.

Move /dev/sda5 "/swap" toward/into the empty space created by moving "/home"

Expand /dev/sda1 "/" into the empty space created by moving "/swap"

Reboot into a system with lots of space to do an upgrade.


It has been quite a long time since I tried to move the front of a partition using gparted, and IIRC it did not go well.

Have you found that mechanism to be reliable? It generally requires a great deal of copying of files that are on the partition...

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Aug 28th, '17, 04:27
by Ken-Bergen
jiml8 wrote:It has been quite a long time since I tried to move the front of a partition using gparted, and IIRC it did not go well.

Have you found that mechanism to be reliable? It generally requires a great deal of copying of files that are on the partition...
Yes I have used gparted in this manner to successfully increase the size of "/".

It does take some time and as always a backup of anything you don't want to loose is recommended.

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Sep 5th, '17, 00:21
by fabulous-muller
I would boot with the live cd , install fsarchive and gparted from the repos, Backup /home to an ext.usb hd with fsarchiver. Delete / and /home resize and format to what size you want then fresh install , boot live again, fsarchive to restore the file to /home. Use multi-thread for backp (-j2 or j-4) if you have multiple core cpu. Be careful just with the /home length. You should restore ,obvioulsy, to a partition with enough space to fit your data. Both programs worked fine for me with Mag5 / WIn10 resizes.
;)

Re: What To Back Up Before Doing a Fresh Install of Mageia?

PostPosted: Sep 7th, '17, 14:04
by marchugo
Hello,

I plan to upgrade from MGA 5 32 bit to MGA 6 64 bit, with a clean install.
Is it safe to use rsync or fsarchiver to backup 32 bit partitions like /home, /etc, /lib/systemd, /var/lib? Can these backups safely be put back on the new clean 64 MGA 6 system?

Thanks,
marc