• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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.5k 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.
  • P
    pjft @Sano
    last edited by 3 May 2017, 14:41

    @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
    • T
      TMNTturtlguy
      last edited by 3 May 2017, 14:43

      @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!

      P 1 Reply Last reply 3 May 2017, 14:47 Reply Quote 0
      • P
        pjft @TMNTturtlguy
        last edited by 3 May 2017, 14:47

        @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?

        T 1 Reply Last reply 3 May 2017, 14:58 Reply Quote 1
        • T
          TMNTturtlguy @pjft
          last edited by 3 May 2017, 14:58

          @pjft not sure i am doing the cat /etc/ correct, i am guessing i am supposed to be putting something else in instead of <filenames>? but here is what i get

          good card
          0_1493823292102_upload-3b000022-30bb-474f-9c27-227bc5627d9f

          Bad card
          0_1493823494164_upload-24509540-2860-42be-957e-086e2f7aa92c

          P 1 Reply Last reply 3 May 2017, 15:02 Reply Quote 0
          • S
            Sano
            last edited by 3 May 2017, 14:59

            @pjft Thanks :) Had it for many years now.

            @TMNTturtlguy could you please do a ls -l /media and post the result ?

            T 1 Reply Last reply 3 May 2017, 15:12 Reply Quote 1
            • P
              pjft @TMNTturtlguy
              last edited by 3 May 2017, 15:02

              @TMNTturtlguy Definitely - replace <filenames> with 10_retropie_mount

              :)

              And follow @Sano 's advice, as he definitely seems more knowledgeable about this :)

              T 1 Reply Last reply 3 May 2017, 15:15 Reply Quote 1
              • T
                TMNTturtlguy @Sano
                last edited by 3 May 2017, 15:12

                @Sano ls -l/media on bad card gives me this: total 0

                Do you want that for the good card?

                1 Reply Last reply Reply Quote 0
                • S
                  Sano
                  last edited by 3 May 2017, 15:14

                  Nope, just do a "sudo mkdir /media/usb0" and retry :)

                  Here is what /media should be like :
                  pi@retropie:~ $ ls -l /media
                  total 68
                  lrwxrwxrwx 1 root root 4 nov. 5 22:35 usb -> usb0
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb0
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb1
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb2
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb3
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb4
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb5
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb6
                  drwxr-xr-x 2 root root 3488 nov. 5 22:35 usb7

                  T 1 Reply Last reply 3 May 2017, 15:18 Reply Quote 1
                  • T
                    TMNTturtlguy @pjft
                    last edited by 3 May 2017, 15:15

                    @pjft bad card
                    0_1493824487298_upload-56ff12ed-18e1-4e0e-a273-a9edef980eca
                    0_1493824533677_upload-2c88aa17-6465-4f53-8803-38668613f36c

                    1 Reply Last reply Reply Quote 0
                    • T
                      TMNTturtlguy @Sano
                      last edited by 3 May 2017, 15:18

                      @Sano 0_1493824665985_upload-3d9cd622-2436-4650-8246-6cfd9720a6bd

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sano
                        last edited by Sano 5 Mar 2017, 16:26 3 May 2017, 15:21

                        Ok, try to plug your USB thumbstick now. This should work.
                        It seems that the content of the folder /media was not copied.
                        It is used by usbmount as mountpoints.
                        Fortunately, you could just recreate the folders with mkdir, and eventually the symlink witn ln -s.
                        Alternatively you can reinstall the usbmount package.

                        1 Reply Last reply Reply Quote 2
                        • T
                          TMNTturtlguy
                          last edited by 3 May 2017, 15:45

                          @Sano and @pjft it worked!

                          Sorry for the delay, i was on a work call. This absolutely worked. I need to make sure that everything is there, but when i restarted, the USB was recognized and the roms appeared!

                          So I am 100% sure that my process to create the copy using rpi-clone was correct, and i performed the clone twice with identical results. Every other aspect of the clone looks to be 100% correct at this point. I am going to add the mkdir command to my personal instructions. When i do this for my other build I will see if i have to follow the same steps. If so, i might attempt a wiki on how to use the rpi-clone tool with the automated usb service.

                          Thanks to both of you for all the help. i can't believe it was something so simple after all that work.

                          1 Reply Last reply Reply Quote 3
                          • S
                            Sano
                            last edited by 3 May 2017, 16:30

                            Nice.
                            Glad I could help a bit. :)
                            And don't blame you, a lot of resolutions tend to be simple when the problem is identified.

                            P 1 Reply Last reply 3 May 2017, 16:32 Reply Quote 2
                            • P
                              pjft @Sano
                              last edited by 3 May 2017, 16:32

                              @Sano Thanks for stepping in here!

                              Any idea why the usb0 folder would not have been present at the time of cloning the card? Would it be related to unmounting that particular drive before cloning, would that remove the folder?

                              1 Reply Last reply Reply Quote 1
                              • S
                                Sano
                                last edited by 3 May 2017, 16:41

                                @pjft My pleasure.

                                Regarding the usbx folders, they're created during the usbmount package intall and should be there.
                                I suppose there is an exclusion on /media in the clone script in order to avoid copying external disks content, but with a depth at 0, which would cause this issue...
                                This is only deduction, the problem could be elsewhere.

                                P 1 Reply Last reply 3 May 2017, 16:45 Reply Quote 0
                                • P
                                  pjft @Sano
                                  last edited by 3 May 2017, 16:45

                                  @Sano I see. You are correct!

                                  I suppose, since I was mounting things via fstab that I never ran into a similar problem.

                                  Thanks for helping out with this!

                                  And @TMNTturtlguy , if you'd rather skip that step, I can recommend the manual mounting mode described earlier, though you probably don't want to go down yet another rabbit hole now that you have something working! :D

                                  T 1 Reply Last reply 3 May 2017, 17:08 Reply Quote 2
                                  • T
                                    TMNTturtlguy @pjft
                                    last edited by 3 May 2017, 17:08

                                    @pjft @Sano So it appears that the media is always excluded in the script, so i probably will need to make that directory every time? It is an easy step to do.

                                    @pjft my question for you is why it would matter which way I mount the usb service in the first place? What does the manual method do that it does not use the media directory?

                                    S P 2 Replies Last reply 3 May 2017, 17:25 Reply Quote 0
                                    • S
                                      Sano @TMNTturtlguy
                                      last edited by Sano 5 Mar 2017, 18:26 3 May 2017, 17:25

                                      IMO the best option would be to open an issue on the rpi-clone script project if it's still alive.
                                      As confirmed by @pjft (thanks for digging in the script), the media folder is excluded, and the script could be modified in order to either copy the empty dirs in /media, or recreate them.

                                      T 1 Reply Last reply 3 May 2017, 17:32 Reply Quote 0
                                      • T
                                        TMNTturtlguy @Sano
                                        last edited by 3 May 2017, 17:32

                                        @Sano I will look into that. Why would the script exclude any of those files? Seems to me that if i want a clone, i want a clone. Would there be any important information in any of these? Should we be recreating these for any reason?

                                        --exclude '.gvfs'
                                        --exclude '/dev'
                                        --exclude '/media'
                                        --exclude '/mnt'
                                        --exclude '/proc'
                                        --exclude '/run'
                                        --exclude '/sys'
                                        --exclude '/tmp'
                                        --exclude 'lost+found' \

                                        S 1 Reply Last reply 3 May 2017, 17:42 Reply Quote 0
                                        • S
                                          Sano @TMNTturtlguy
                                          last edited by Sano 5 Mar 2017, 18:45 3 May 2017, 17:42

                                          /mnt and /media are excluded to avoid copying external disks contents.

                                          Others are system folders , the content is created dynamically by the kernel (/sys, /dev, /proc, /run), temporary folders with content erased every reboot (/tmp), or hidden data used for Gnome virtual file system (.gvfs).
                                          Lost+found are FS-related folders used by fsck in case of FS corruption.

                                          Excluding all those contents is actually legit, but regarding /media it seems to break usbmount, which could be considered as a bug.

                                          1 Reply Last reply Reply Quote 1
                                          85 out of 87
                                          • First post
                                            85/87
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received