You are not logged in.

#1 2013-06-02 23:47:55

kaivai
Member
Registered: 2013-05-17
Posts: 21

[Solved] Cannot Login to Restored Rsync

Hey Folks,

Sorry I have a followup question about Rsync.
I have restored an rsync backup (on a different computer, after adjusting fstab + both have an ati card and I am using open source drivers) and I am unable to login either from my slim prompt, or from a tty console. I am unable to login as myself or as root.
I should have seen this coming since I was unable to login to my backup with systemd-nspawn or a VM while testing my backups.

I backed up my pc as recommended on the Arch Wiki (https://wiki.archlinux.org/index.php/Fu … with_rsync) using the flags:
archive, preserve ACLs, preserve extended Attributes, (verbose)

 sudo rsync -aAXv /* /mnt/usb/ArchBackup --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} 

I restored my pc by booting arch from the install usb. (did not need sudo since logged in as root by default. also, I do not think sudo is pre-installed on the install media).

mount /dev/sdc2 /mnt/arch
mount /dev/sde1 /mnt/usb
rsync -aAXv /mnt/usb/ArchBackup/ /mnt/arch/

Slim boots just fine, I just can't login from slim or from a console.



--My Search Results--
I couldn't find anything on the arch forums about this, or in the arch wiki. I found a couple of related posts on other forums:
http://www.linuxquestions.org/questions … 175461085/
which recommended setting SELINUX=permissive but I cannot find a config file for selinux

sudo updatedb
locate selinux | grep config

# The closest I came to finding something was:
/usr/src/linux-3.9.4-1-ARCH/security/selinux/Kconfig

http://www.redhat.com/archives/rhl-list … 04284.html
Someone had a similar problem on redhat but they hadn't used the X flag to preserve permissions (Which I did). On these forums they recommended

touch /.relabel

which does not seem to be working for me either.


I'm going through the manpages now related to selinux and rsync hoping to find something that I have missed. Has anyone else ran into this type of thing before? Is anyone else using rsync directly for backups insead of something like Duplicity or Bacula or plain old Tar files?
Thank you once again for your help, I'm sorry I keep floundering here.

Kai

Last edited by kaivai (2013-06-03 02:11:42)

Offline

#2 2013-06-03 00:52:35

Max-P
Member
Registered: 2011-06-11
Posts: 164

Re: [Solved] Cannot Login to Restored Rsync

Hello,

What filesystem is your storage using? I see you are restoring from a USB device (/mnt/usb/), and these are are usually formatted as NTFS by default since they are designed for Windows, which obviously doesn't support Linux permissions. I say this because I forgot it a couple of times myself, and I share my drive with Windows computers. I broke Wine installs, parts of my home folder and things like that because I forgot to make sure it was on an appropriate FS.

I did a couple of backups using rsync ext4->ext4, and I never had any problem, system was always booting fine after restore.

Just in case, check the permissions on your backup to see if they were saved right before even searching why they don't restore correctly; if they are saved wrong, they won't restore correctly either.

Hope this helps a bit

Offline

#3 2013-06-03 01:23:37

kaivai
Member
Registered: 2013-05-17
Posts: 21

Re: [Solved] Cannot Login to Restored Rsync

Damn it! You are absolutely right. The filesystem is either fat32 or ntfs (I think I changed it to ntfs for 'deeper' directories). NTFS has been my portable filesystem of choice because I can load it in Linux, Windows and OSX (now that I have bought the tuxera toolset (stupid purchase, I haven't used osx since it was installed)). Either way this is definitely the source of the problem. I'll have to create a linux-restore partition on my external hard drives.

Thank you so much for your help! This never would have occurred to me!

Kai

Offline

#4 2013-06-03 01:51:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [Solved] Cannot Login to Restored Rsync

Please mark your thread solved by editing your original post and tagging the subject line [solved]. Thanks.

By the way, you are not using selinux on Arch unless you know you are!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-06-03 02:16:23

kaivai
Member
Registered: 2013-05-17
Posts: 21

Re: [Solved] Cannot Login to Restored Rsync

Oh my goodness, I totally forgot to changed the post to solved. I am very sorry! It has now been marked as solved.

haha - this is very good to know. After reading about it a bit, it certainly sounds like something I do not need for my very simple uses. Thank you Cymru!

Offline

#6 2013-06-03 22:24:39

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [Solved] Cannot Login to Restored Rsync

On behalf of my entire country, then, I appreciate your thanks.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB