I'm attempting to run a restore from backup of a test centos server that I have running on a local machine. The server is mimicking the same backup procedures we have running on another server, and I want to make sure they work as a disaster recovery method, hence the testing.
The back up files are stored in an /opt directory (full directory at /opt/backup_box/date_of_backup). Each of the root directories has it's own tar file (so there is a bin.gz, var.gz, root.gz, etc) the exception is opt, which isn't backed up as to avoid backing up the backups.
I've created a simple shell script that untars each of the files to the root path, using a command of:
tar -C / -xvpf filename.gz
When I run the shell script, the files are all untared and moved to the root. The system appears to be running fine, basic unix commands work, etc. However, after rebooting the box, I can't log in (logging in as root, there are no other users on this test box).
When I try to ssh into the box, I get the following messages:
Last login: Tue Sep 29 15:35:06 2015 from xxxxxxxxxxxxxxxxxxxxx /bin/bash: Permission denied Connection to xxx.xx.xxx.xxx closed.
I've also tried to log in directly into the box, thinking maybe there was an issue with ssh. Logging into the box doesn't present me with any errors, but it doesn't let me in ether. Instead, when I login in, the box just displays the login prompt again. I have tried using an incorrect password, and in that case the server does present me with an "login incorrect" message, so I know the password is fine.
I've also tried resetting the root password before rebooting, which hasn't helped. I've also used grub and was able to get into the box by adding "init=/bin/bash" to the system prompt box. From there I was able to check that /bin/bash, as well as /bin both have 755 as their permissions. I also attempted to mount the root file system as RW, change the password from grub, and then reboot. This also didn't fix the issue.
Not sure where to go from here.