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

    How do the configs/FROM_RETROPIE, and TO_RETROPIE Folders (on USB) work?

    Scheduled Pinned Locked Moved Help and Support
    initial setupconfigusb transfer
    11 Posts 5 Posters 7.9k 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.
    • D
      Dochartaigh
      last edited by Dochartaigh

      When you insert a USB drive into your Pi with a "retropie" folder on it, it creates all your folders to place your ROMs into. Is ALSO makes a "config" folder with a "from_retropie" and "to_retropie" folder. Can these folders be used to automatically transfer over all the different config files I currently have to either manually edit now, or at least browse to all those individual folders via FTP and drag the edited file I saved over.

      It's super easy to keep the folder structure on my hard drive with all my ROMs in their correct folder, but for instance I edit config files in the following folders (to name just a few):

      /etc/emulationstation
      “Es_systems.cfg”

      /opt/retropie/configs/all
      “Retroarch.cfg”

      /opt/retropie/configs/all/
      ”Retroarch-core-options.cfg”

      /opt/retropie/configs/all/retroarch-joypads/
      “NESPCGamePadNESPCGamePad.cfg”
      (I dump like 10 pre-mapped cfg files in here for all my different controllers as well)

      /opt/retropie/emulators/retroarch/shader/
      “crt-pi-modified.glslp”

      /opt/retropie/emulators/retroarch/shader/shaders/
      "crt-pi-modified.glsl"

      I would LOVE to be able to set it up so I have 1 USB drive, I insert it into the Pi, and it copies over all the ROMs, AND all the config files I commonly modify. Reboot, and everything is now setup exactly how I wanted it. No FTPing. No manually editing text files. No having to sudo nano anything (which brings up another point - I can NEVER FTP/drag over "/boot/config.txt", I always have to sudo nano /boot/config.txt via SSH that file, even when I sudo chmod 777 -R that file it won't let me transfer it via FTP --logged in with Pi/Raspberry username/password).

      EDIT lol, through my googling this question even more, guess what comes up as the first result? A topic I made over 3 months ago (and evidently forgot about) - with ZERO replies....come on, you guys made RetroPie! you must surely know why those folders are there and how to use them!

      1 Reply Last reply Reply Quote 0
      • D
        Dochartaigh
        last edited by

        Come on master programmers... This information has to be somewhere....Retropie wasn't programmed to add random from_retropie and to_retropie folders (inside a config folder) for shits and giggles...

        herb_fargusH 1 Reply Last reply Reply Quote 0
        • herb_fargusH
          herb_fargus administrators @Dochartaigh
          last edited by

          @Dochartaigh it's not really documentated. Try it out and see what you come up with. Then feel free to edit the wiki with more detail on how it works or look in the code and look up how rsync works .

          I don't have time to test but a little trial and error teaches a lot.

          Code for reference:

          https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/usbromservice/01_retropie_copyroms#L19

          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators
            last edited by

            That code was added some time ago. I never got around to either testing it well or documenting it.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            D 1 Reply Last reply Reply Quote 0
            • D
              Dochartaigh @BuZz
              last edited by

              So I can barely write HTML without using all of Adobe Dreamweaver's code shortcuts...but this seems to be the relevant code blocks:

              log info "Syncing configs ..."
              # copy configs to usb
              for to in "${!path_mapping[@]}"; do
                  from=${path_mapping[$to]}
                  log_cmd rsync -rtu --exclude '._*' --max-delete=-1 "$from/" "$usb_path_from_rp/$to/"
              done
              
              # copy configs from usb
              for from in $(find "$usb_path_to_rp/" -mindepth 1 -maxdepth 1); do
                  # basename
                  from_bn=${from##*/}
                  to=${path_mapping[$from_bn]}
                  if [[ -n "$to" ]]; then
                      log_cmd rsync -rtu --exclude '._*' --max-delete=-1 "$from/" "$to/"
                      chown -R $user:$user "$to"
                  fi
              done
              

              So what folders does this automatically sync? path_mapping is $rootdir/configs? And what config directory? There's like 50 of them! ...sorry, this stuff is a foreign language to me.

              BuZzB 1 Reply Last reply Reply Quote 0
              • BuZzB
                BuZz administrators @Dochartaigh
                last edited by

                @Dochartaigh it should copy anything in usb configs/to_retropie/configs to /opt/retropie/configs

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                D 1 Reply Last reply Reply Quote 0
                • D
                  Dochartaigh @BuZz
                  last edited by

                  @BuZz
                  Cool. So I can safely mirror the /opt/retropie/configs folder directory on the memory stick, then put in all the edited config files in those folders and it'll automatically copy over. That'll save some time at least - thank you!

                  Looks like I'll still have to manually edit the /etc/emulationstation, /boot/config.txt, and my slight shader tweaks (since those folders are outside the /opt/retropie/configs folder) but that's perfectly fine.

                  BuZzB 1 Reply Last reply Reply Quote 0
                  • BuZzB
                    BuZz administrators @Dochartaigh
                    last edited by

                    @Dochartaigh When plugging in a USB stick, it should backup the existing configs in configs/to_retropie/configs btw.

                    It's easier and more reliable to just copy stuff over the network though. I don't think I've ever bothered using the usbromservice stuff apart from when developing/testing.

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Dochartaigh @BuZz
                      last edited by Dochartaigh

                      @BuZz

                      I'l have to look on the USB stick I use to house ROMs - barely ever plug it back into my PC unless I change some of the games.

                      I build so many of these (because it's fun...well sometimes, when things go smoothly ;) and I'm constantly striving for the best performance from these little $5 computers, and I have GRANDIOSE dreams of having a master USB stick I put into any Pi, and it copies over EVERYTHING (ROMs, all scaper data/images, ALL my setting/config files), then just reboot and I have a brand new setup...but I don't think it's there quite yet. ROMS are WAY too big (like 14gb for me - and that's just 16 bit and below and a couple DOSBox games) so I'm still stuck using a USB stick to transfer.

                      K 1 Reply Last reply Reply Quote 1
                      • K
                        kif @Dochartaigh
                        last edited by

                        @dochartaigh any chance you have that USB configuration? It'd be great to get in touch since I am looking into something similar.

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @kif
                          last edited by

                          @kif Please open a new topic, don't bump old topics.

                          1 Reply Last reply Reply Quote 0
                          • 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.