You are not logged in.

#1 2012-01-13 03:41:09

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Smart way to change filesystems, utilizing my external hard drive?

I have a sufficiently large external hard drive to hold all the data on my Arch installation.

I would like to convert all of my partitions to ext4, from jfs and reiserfs so that I can take advantage of e4rat.

What is the most simple way to backup my data, reformat the partition, and then dump the data back in without breaking all my stuff?

Offline

#2 2012-01-16 14:53:24

pilotkeller
Member
From: Canada
Registered: 2011-12-22
Posts: 513
Website

Re: Smart way to change filesystems, utilizing my external hard drive?

#!/bin/bash/

# Takes an argument as the location of your backup drive's mount folder.
# Run as root.
# Eg. backup.sh /mnt/backup_drive/

pacman -Qet > $1/pacman_programs_list.txt
cp -R /etc $1
cp -R /home $1
cp -R /root $1

Then reinstall Arch.

After the install run:

#!/bin/bash/

# Run from your backup drive as root.

./pacman_programs_list.txt | awk '{print $1}' | pacman -Syyu
cp -R ./etc /etc
cp -R ./home /home
cp -R ./root /root

Please understand I didn't test these and you REALLY should test them and make sure they work BEFORE you reinstall. They are simply a guide to give you an idea of how I would change filesystems. Obviously there is a better way, I just don't know it. tongue

Offline

#3 2012-01-16 16:56:05

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Smart way to change filesystems, utilizing my external hard drive?

I personally would use fsarchiver from a live CD (system rescue CD always has worked great for me). This way there's no reinstall -- and just one reboot. Just
1. Boot live CD
2. Save all your filesystems with fsarchiver to your external hard drive
3. Reformat your partitions as desired
4. Extract the fsarchiver archives back into your new filesystems
5. Edit grub/syslinux UUID's if necessary
6. I can't remember if you have to chroot and redo mkinitcpio....but it couldn't hurt!

Good luck!
Scott

Offline

#4 2012-01-16 20:46:14

Maki
Member
From: Skopje, Macedonia
Registered: 2007-10-16
Posts: 353
Website

Re: Smart way to change filesystems, utilizing my external hard drive?

pilotkeller wrote:
#!/bin/bash/

# Takes an argument as the location of your backup drive's mount folder.
# Run as root.
# Eg. backup.sh /mnt/backup_drive/

pacman -Qet > $1/pacman_programs_list.txt
cp -R /etc $1
cp -R /home $1
cp -R /root $1

Then reinstall Arch.

After the install run:

#!/bin/bash/

# Run from your backup drive as root.

./pacman_programs_list.txt | awk '{print $1}' | pacman -Syyu
cp -R ./etc /etc
cp -R ./home /home
cp -R ./root /root

Please understand I didn't test these and you REALLY should test them and make sure they work BEFORE you reinstall. They are simply a guide to give you an idea of how I would change filesystems. Obviously there is a better way, I just don't know it. tongue

Don't ever use cp to backup something!!! it messes with file permissions and it can wreack havoc on your install. Read this here http://ubuntuforums.org/showthread.php?t=35087


If it ain't broke, broke it then fix it.

Offline

#5 2012-01-16 20:55:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Smart way to change filesystems, utilizing my external hard drive?

Is 'cp -a' considered harmful too?

Offline

Board footer

Powered by FluxBB