You are not logged in.

#1 2014-07-22 05:14:44

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

[SOLVED] Backup, resize and restore

Hi all!
I currently have a setup like this:

100 ext4 /boot partition
10 Gb LUKS -> ext4 / partition
40 Gb LUKS -> ext4 /home partition


What I'm trying to do here is to resize /home, substracting 10Gb from it to give it to the root partition.
Now, this would be a piece of cake if it wasn't for the LUKS setup. I can resize the ext4 partitions within the LUKS containers, but I can't resize the LUKS containers themselves.

The system is currently configured to what i was looking for, and i'd like to keep it that way, so, my question is:
1: Is there a way to resize LUKS partitions without losing data?
2: Can I just "tar" everything to another media, resize and format and then restore everything back? How am I supposed to manage the permissions, ownerships... etc if I do it this way?
3: Suggestions?


Thank you.

Last edited by Xi0N (2014-07-28 06:09:22)

Offline

#2 2014-07-24 16:55:05

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Backup, resize and restore

Xi0N wrote:

Can I just "tar" everything to another media, resize and format and then restore everything back? How am I supposed to manage the permissions, ownerships... etc if I do it this way?

I think that's perfectly possible. Just boot into a live environment and tar everything up. After you untar it, the only thing you might need to do is re-install the boot loader.

Permissions and ownerships shouldn't change. Tar will remember the permissions, and ownership is based on the UID which is stored in the "/etc/passwd" file (that will be included in the tar file).

Last edited by drcouzelis (2014-07-24 16:55:49)

Offline

#3 2014-07-24 18:26:09

Pse
Member
Registered: 2008-03-15
Posts: 413

Re: [SOLVED] Backup, resize and restore

You won't get in trouble with permissions as long as you do things as root. Remember to exclude external filesystems from the backup. See here:
https://wiki.archlinux.org/index.php/Fu … p_with_tar

Offline

#4 2014-07-28 06:10:10

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: [SOLVED] Backup, resize and restore

This worked perfectly. Thanks

Offline

#5 2014-07-28 06:19:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Backup, resize and restore

Offline

Board footer

Powered by FluxBB