RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Backup SD Card by copying out files?

    Scheduled Pinned Locked Moved Help and Support
    sd card failurebackupimage
    87 Posts 10 Posters 33.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mediamogulM
      mediamogul Global Moderator @pjft
      last edited by mediamogul

      @pjft

      First rule of RetroPie Club.

      Speaking of the club, we really need to rethink the whole "not talking about RetroPie club" rule, as it seems to be negatively affecting our enrollment.

      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

      pjftP 1 Reply Last reply Reply Quote 1
      • pjftP
        pjft @mediamogul
        last edited by

        @mediamogul I concede that that was a bit of a dumb move for the RetroPie club, in retrospect, together with the "no shirts, no shoes" thing.

        1 Reply Last reply Reply Quote 1
        • pjftP
          pjft @TMNTturtlguy
          last edited by

          @TMNTturtlguy I wouldn't have moved .emulationstation to the USB, but you can certainly move over the gamelists only.

          I suspect that, if they're present on the actual roms/<system> folders, they override the .emulationstation ones. Just make sure to replace all paths by the correct ones (i.e. images pointing to .emulationstation rather than to the RetroPie/roms/<something> folder).

          TMNTturtlguyT 1 Reply Last reply Reply Quote 0
          • TMNTturtlguyT
            TMNTturtlguy @pjft
            last edited by

            @pjft yeah, that is what i though, i just have to move the ones from .emulationstation into the roms folder and go through a few hundred roms and change the paths....on all the images and videos...talk about a fun evening!

            pjftP 1 Reply Last reply Reply Quote 0
            • pjftP
              pjft @TMNTturtlguy
              last edited by

              @TMNTturtlguy I mean, other than the number of files, it shouldn't be a lot more complex than:

              1 - Open file
              2 - Find and replace <reference to /home/pi/.emulationstation folder or equivalent> with /home/pi/RetroPie/roms or equivalent, depending on the structure.
              3 - Save.
              4 - Move file.

              That's how I did it when I had to go through the same thing.

              TMNTturtlguyT 1 Reply Last reply Reply Quote 1
              • mediamogulM
                mediamogul Global Moderator @TMNTturtlguy
                last edited by mediamogul

                @TMNTturtlguy

                I might have to invest several hours into redoing some of my gamelists.

                What happened to your gamelists?

                Edit: Ah, I see it now.

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                1 Reply Last reply Reply Quote 1
                • TMNTturtlguyT
                  TMNTturtlguy @pjft
                  last edited by

                  @pjft Light Bulb! DUH, yup, do that for the path for the images and videos, save and close! I just did this when I created my "hacks" systems, I am using the same gamelist, just copied pasted, find all and replaced with the new 'systemname'hacks path! Thanks for reminding me how easy things can be when you slow down for a second and think thing through.

                  1 Reply Last reply Reply Quote 0
                  • TMNTturtlguyT
                    TMNTturtlguy
                    last edited by TMNTturtlguy

                    @pjft I successfully backed up my roms to the USB drive and that works great. Deleted all but one rom and bios form each system from the 128gb SD Card and put the USB back into the pi and it was perfect. Reads the games off of the usb stick.

                    Then i did the rpi-clone. Ran that and put the 16gb card into the pi, started right up with one game in each system. Turned the pi off, put the USB in and turned on the 16gb card and still only 1 game. The new image on the 16gb card is not reading the USB drive. The original 128gb card is. Any thoughts? I was thinking that the raspi-clone was an identical clone, but it is not operating that way?

                    Edit: When i go into WinSCP and look at the media folder is says that the usb location does not exist.

                    pjftP 1 Reply Last reply Reply Quote 0
                    • pjftP
                      pjft @TMNTturtlguy
                      last edited by

                      @TMNTturtlguy It certainly should. Also, for reference, I was successful in using an 8GB card as well, if you want to go as small as possible.

                      Would I be correct in assuming that you actually installed rpi-clone from

                      https://github.com/billw2/rpi-clone
                      

                      ?

                      The instructions I have in my own cheatsheet are:

                      sudo ./rpi-clone sda -f -v
                      
                      where "sda" is the device of the destination disk (i.e. may be sdb, for instance).
                      
                      Also, MAKE SURE TO BOOT THIS WITHOUT THE ROMS USB DRIVE PLUGGED IN, OTHERWISE THIS WILL NOT WORK AS INTENDED.
                      

                      I wrote them for myself. You can find out which logical device the destination card is via dfand seeing which sd<something> matches the external SD card via USB.

                      What happens right now if you unplug and re-plug the USB drive, though? You should at least be able to see it mounting as an external drive, even if it doesn't mount as the ROM destination folder.

                      I'm not fully familiar with the automated mount thingie, but shouldn't be rocket science. What I expect to happen would either be:

                      • Things work as expected;
                      • USB drive is recognized, but isn't mounting in the right place for some reason.

                      If none are happening, that should be a different thing. Definitely unplug it and plug it to see if it's properly recognized.

                      You can list all devices via dfas mentioned.

                      Let us know how it goes.

                      TMNTturtlguyT 1 Reply Last reply Reply Quote 0
                      • TMNTturtlguyT
                        TMNTturtlguy @pjft
                        last edited by

                        @pjft Yes, i installed from the location you have listed above. I also used the sudo code above exactly as stated and i did not have the USB Roms drive plugged in. I actually did this process twice with the same results both times.

                        If i unplug the roms usb and plug it back in, nothing happens, light on the usb blinks a few times, but it is not read. If i use df it does not show the Roms USB and it also does not show up in WinSCP. Here is a shot of the df:
                        0_1493792575566_df.JPG
                        also assuming you would help troubleshoot, i took these shots of the rpi-clone process.

                        Here were my steps. Shutdown pi, take out Roms USB. Start up pi and quit emulationstation. Using putty i ran the rpi-clone. It asked if i wanted to unmount /media/usb0

                        At this point the only thing plugged into the pi is the usb card reader with the new smaller SD card in it. I chose no and it cancels the clone. I have to choose yes to proceed. Again, the Roms USB was not installed.
                        0_1493792820887_unmount media.JPG

                        Next i get this screen, the first attempt i named the drive, the second attempt shown here, i did not name the drive, thinking that maybe the name of the drive was causing the error.
                        0_1493792919932_proceed to clone.JPG

                        Ran this through, finished, no luck with the roms usb. Nothing even shows up in my WinSCP media, it is empty. I tried to go in an reenable the USB Automated mount, no luck. Tried to mount a new usb, wont do mount a new usb either. I hope this is enough info to trouble shoot? I have not yet slept and i have to work in 4 hours, so i am going to shut down for the night, but hope to continue this tomorrow. Thanks!

                        pjftP 1 Reply Last reply Reply Quote 0
                        • pjftP
                          pjft @TMNTturtlguy
                          last edited by

                          @TMNTturtlguy Definitely go to sleep, we'll sort things out one way or the other :)

                          I'm confused as to why the USB drive doesn't even show up. You do confirm it shows up using your other card, correct?

                          What does dfshow on the other scenario? What does lsusbshow when you plug the USB drive in? What about dmesg | tail? And what about cat /etc/fstab, in both your SD cards?

                          I am not an expert in Raspbian, nor in the auto-mount mechanism from recent RetroPie, but I'm happy to chime in and attempt to help you out. Also, this thread might help if nothing funny is going on at the moment.

                          1 Reply Last reply Reply Quote 0
                          • I
                            ibiza7 @pjft
                            last edited by

                            merci beaucoup !!:D ca va mieux

                            1 Reply Last reply Reply Quote 0
                            • TMNTturtlguyT
                              TMNTturtlguy
                              last edited by

                              @pjft Thanks for all the help as usual!

                              Yes, confirmed I am running off of the USB on the original card. Here is the info for the original card running off of the USB:
                              Working card with working USB - all commands shown
                              0_1493814158356_working card.JPG

                              rpi-clone card non working usb - all commands shown
                              0_1493814452336_not working.JPG

                              pjftP 1 Reply Last reply Reply Quote 0
                              • pjftP
                                pjft @TMNTturtlguy
                                last edited by

                                @TMNTturtlguy Is your USB drive a Kingston drive?

                                In the "bad" card, you mention the USB drive blinks, then stops. Can you unplug it, run those commands (dmesg | tail, lsusband df), and then replug it and run the commands again?

                                Also, does cat /var/log/syslogoutput anything for you? If so, what does it state for both cards?

                                I'm somewhat stumped, but we'll make it work.

                                Alternatively, if this thread doesn't help (just noticed I forgot to paste the link earlier), I'd love to read up on both boot logs (dmesg) - for the good and bad cards.

                                But a few things first to try. As I said, I have this working though I am not using the automated mount from RetroPie, but rather the old method via fstab. I am confused as to why you would have such differences between cards, though.

                                TMNTturtlguyT 1 Reply Last reply Reply Quote 1
                                • TMNTturtlguyT
                                  TMNTturtlguy @pjft
                                  last edited by

                                  @pjft The usb drive is a computer stores brand - they offer lifetime warranties on them, so if they go bad, they just give you a new one. So i can't be positive, but I assume it is the one that shows up.

                                  No USB inserted
                                  0_1493819510358_no usb.JPG

                                  USB inserted
                                  0_1493819607103_usb inserted.JPG

                                  Cat /var/log/syslog for non working Card
                                  0_1493820099608_usb fail.JPG

                                  cat /var/log/syslog for working card
                                  0_1493820345199_working mount.JPG

                                  pjftP 1 Reply Last reply Reply Quote 0
                                  • pjftP
                                    pjft @TMNTturtlguy
                                    last edited by

                                    @TMNTturtlguy Thanks.

                                    A few questions, if possible - and thanks for putting up with all of this.

                                    So, the USB drive seems to be detected - as you can tell by the Kingston device showing up in both versions. However, it's not being mounted for some reason.

                                    1. What does ls /dev/sd*show in your bad card?
                                    2. What does cat /etc/usbmount/mount.dshow in both?

                                    I'm also wondering if that's your entire syslog for the working card? Seems awfully short.

                                    Also, on the one that doesn't work, there seems to be an awfully long (4-min?) gap between a device being apparently disconnected, and a new one connecting? See device disconnect 4, and new number 5. Does that happen at all boots?

                                    I'm happy to help you set it up as mounted via the old process, though I'm more keen on exploring why the difference in behavior here.

                                    1 Reply Last reply Reply Quote 1
                                    • SanoS
                                      Sano
                                      last edited by

                                      I think a "sudo fdisk -l /dev/sda" could provide some useful information too.

                                      pjftP 1 Reply Last reply Reply Quote 1
                                      • pjftP
                                        pjft @Sano
                                        last edited by

                                        @Sano If you have the expertise here, would love your inputs as I'm certainly out of my league here :)

                                        By the way, love your avatar!

                                        1 Reply Last reply Reply Quote 0
                                        • TMNTturtlguyT
                                          TMNTturtlguy
                                          last edited by

                                          @pjft The syslog for both cards is very very long, i just cut out the parts i saw about the usb drive. is there a way i can output the entire log? I went into the folder, but the log is not a typical file type that i could open and read.

                                          1. ls /dev/sd* shows: /dev/sda /dev/sda1
                                          2. cat /etc/usbmount/mount.d in the bad card = cat: /etc/usbmount/mount.d: Is a directory

                                          Sano: sudo fdisk -l /dev/sda on bad card
                                          0_1493822588370_bad card.JPG

                                          i will do the same for good card and post back momentarily
                                          Thanks!

                                          pjftP 1 Reply Last reply Reply Quote 0
                                          • pjftP
                                            pjft @TMNTturtlguy
                                            last edited by

                                            @TMNTturtlguy So, the drive is there, and it's in the right mount point (sda1) - for whatever reason, it fails to be mounted.

                                            Can you do ls /etc/usbmount/mount.dand then cat /etc/usbmount/mount.d/<filenames>one by one, for both cards?

                                            TMNTturtlguyT 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.