Announcement

Collapse
No announcement yet.

Help, please - restoring Home after crash!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help, please - restoring Home after crash!

    Well, I had it perfect - looked the business, worked a treat - then I had to dabble out of my comfort zone, and...

    After trying everything to fix what I broke, I eventually re-installed - content in the knowledge that I had not two days before completed a BackinTime backup, which included my Home. I also have a live system Disk I made with RemMasterSync (but which in my error at the time had not included the user stuff)

    However, try as I might I couldnt figure out how to get back to where I was using the above. I restored the partition using the Remastersync Live Disk but:

    a) Couldn't for the life of me work out how to restore my 'Home' using BackinTime. The GUI seemed to have a selection called 'Now' but there was no sign of the obvious 'restore' option I had figured, not when I traversed through the layers of files in the BackinTime folder was there an obvious one. I'm obviously missing the trick here but I don't know how.

    b) When eventually I went for what i thought was the obvious solution - to just copy and paste the Home folder from the BackinTime to the newly installed system (from Remastersync) - It took an interminable time to copy (about two hours), had tons of errors (I had used root so it wasn't that) and then when I tried to log back in - nothing! I get to the login, put in my password, it looks like its going to do something then takes me back to the login again.

    ...not only that, but my dual boot Peppermint now hangs before the login.

    Obviously I'm missing something here - can anyone assist? I ideally want to get back to where I was - or as near as possible.

    Thanks

    ps I'm not brilliant at terminal work, so if that is the way to the solution, can you talk me through it as simply as possible.

    #2
    Who owns the files you copied to your home drive? Its likely they are now owned by root if you used root to copy them which can cause the login loop you are experiencing.

    Comment


      #3
      Thanks James. I presume thats correct. I 'saved' Home using BackinTime, then to 'restore' I changed to root (using PCFMan) and then copied from the 'Home backup' to my restored partition (as described earlier). If I'd tried to copy without being root all I get is the 'no permissions' stuff.

      Comment


        #4
        Originally posted by thomasg62 View Post
        Thanks James. I presume thats correct. I 'saved' Home using BackinTime, then to 'restore' I changed to root (using PCFMan) and then copied from the 'Home backup' to my restored partition (as described earlier). If I'd tried to copy without being root all I get is the 'no permissions' stuff.
        Coping as root is ok, but you have to make sure you preserve file owner ship (and permissions and symlinks... etc cp -a should do this for example) if you do otherwise root will own all the copied files. Thus you should check to see if your files are actually owned by you.

        Comment


          #5
          Hi James. Appreciate your time. Unfortunately, I'm a bit too inexperienced to follow your point. I understand that copying files as root would give the ownership to root - and that somehow I would need to change them back to my ownership. I'm not sure I follow:

          a) How I do that.

          I used Kubuntu specifically as it feels familiar in terms of working with GUI's. I appreciate the value - quickness, precision etc - of the terminal, but I never truly understand the terminology and abbreviations used and find it hard to relate to. Hense, where possible in moving stuff from one file to another I do the copy'n'paste or dragging bit. I can relate to that.

          b) How I get everything to copy over and then work the way I want it to.

          I had thought that the point of BackinTime was to let you 'rewind' your system to an earlier time, or act as a back up. However, all I ended up with was files I wanted to copy and a complex process to get them to replace the ones I now have.

          I appreciate that you may be very much proficient with terminal commands, but is there any way to do this by moving files from one visible folder to another, and taking ownership?

          Thanks for your patience - which may be wearing thin!

          Comment


            #6
            Originally posted by thomasg62 View Post
            Hi James. Appreciate your time. Unfortunately, I'm a bit too inexperienced to follow your point. I understand that copying files as root would give the ownership to root - and that somehow I would need to change them back to my ownership. I'm not sure I follow:

            a) How I do that.
            You change owner ship via command line or GUI;
            The command line way:
            With the system booted switch to a virtual terminal (by pressing ALT+CTRL+F1, you can press ALT+CTRL+F7... some times F8 or 9... to switch back to the GUI).
            Log in with your normal user and password.
            Run the following command to check the owner ship of files in your home directory
            Code:
            ls -la ~
            If they are are not owned by you run the following to change ownership back to you
            Code:
            sudo chown -R USERNAME:GROUPNAME /home/USERNAME
            Where USERNAME is the user you want to own the files and GROUPNAME is the name of the group (normally the same as the USERNAME). For example for me it would be;
            [code]sudo chown -R james:james /home/james[code]
            Notes: -R makes it recursive so it will have the ownership of all files and folders under /home/USERNAME
            Then you can log out (by pressing CTRL+D or typing logout) and switch back to the gui (by pressing ALT+CTRL+F7) and try logging in in again.

            The gui method involves booting a live cd, mounting the drive and using dolphin to change owner ship back.

            b) How I get everything to copy over and then work the way I want it to.
            That mostly depends on how it was backed up. Assuming it is just a copy of all the files in /home to a backup drive mounted at /media/backup and you want to restore it to /home you could do;
            Code:
            sudo rsync -av --delete --dry-run /media/backup/ /home/
            --delete will delete any files in /home that aren't in /media/backup and --dry-run will make rsync not actually do anything but is useful to see what is going to happen before actually running it (remove this option when you are happy with the results to actually make the changes. -a will preserve all ownership and permissions and -v makes the command noisy (so you can see what is going on, you can remove this option if you want).

            rsync is a useful command as it wont copy over files that have not changed so can be quicker then doing a full copy.

            Comment


              #7
              Thanks James. Very thorough! I will have a go at this tonight. Incidentally, what was backed up was more than just /home. It included most of what was root (I excluded the files as per the recommendations - lost&found, var etc). Would what you propose work for the other root folders just the same (although I suspect the ownership thing is different)?

              Thanks again

              Comment


                #8
                Originally posted by thomasg62 View Post
                Thanks James. Very thorough! I will have a go at this tonight. Incidentally, what was backed up was more than just /home. It included most of what was root (I excluded the files as per the recommendations - lost&found, var etc). Would what you propose work for the other root folders just the same (although I suspect the ownership thing is different)?

                Thanks again
                Might be easier to recopy the data across with the correct permissions then. Various files have different permissions within / and it might just take longer trying to correct them all (even if you catch them all) for example some are readable only by root such as /etc/shadow.

                Comment


                  #9
                  Okay, thanks. I'll have a look at this. I've now had time to get over my annoyance with myself and I think if needs be I can slowly get my system back to where it was, even if this doesn't work.

                  Comment


                    #10
                    Thanks James - worked a treat with the restoring of Home. Decided to just leave the other Root folders as TBH given that I had reinstalled from a Remastersync image, there shouldnt have been too much difference anyway.

                    One small irritation I am now experiencing is that I cannot seem to change my desktop theme. I can select and apply a new one but nothing happens - no changes take place. I can download and install new ones, but they are the same - no changes occur. Obviously a glitch somewhere. is there anything you can suggest?

                    Thanks again for the recovery stuff

                    Comment

                    Working...
                    X