0855.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Sync EmuDeck Saves with Rclone on SteamDeck</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="SteamDeck,Steam,SteamOS,Rclone,EmuDec,Emulation,Sync,Backup,Bidreictional Sync,Samba,CIFS,Backup Emulation Save Data,Backup EmuDeck Save Data,Automatic File Sync,Backup Emulator Saves To The Cloud,Linux,Arch,Arch Linux,Backup SteamDeck Emulator Saves,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Sync EmuDeck Saves with Rclone on SteamDeck">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="12/07/2022 02:10:49 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Sync EmuDeck Saves with Rclone on SteamDeck</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is EmuDeck?</h2>
  26. <blockquote><em>EmuDeck is a collection of scripts that allows you to autoconfigure your Steam Deck, it creates your roms directory structure and downloads all of the needed Emulators for you along with the best configurations for each of them. -<a href="https://github.com/dragoonDorise/EmuDeck" target="_blank">https://github.com/dragoonDorise/EmuDeck</a></em></blockquote>
  27. <h2>What is Rclone?</h2>
  28. <blockquote><em>Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors&#39; web storage interfaces. -<a href="https://rclone.org/" target="_blank">https://rclone.org/</a></em></blockquote>
  29. <h2>Things You Will Need</h2>
  30. <ul>
  31. <li class="noCheckbox">A SteamDeck</li>
  32. <li class="noCheckbox">A storage location to backup to</li>
  33. </ul>
  34. <h2>Before You Begin</h2>
  35. <p>Make a manual backup of your save files just in case something goes wrong during the initial setup of Rclone.</p>
  36. <h2>Install and Configure Rclone</h2>
  37. <ol>
  38. <li>Boot the SteamDeck &gt; Long press the power button &gt; Shutdown &gt; Switch to Desktop</li>
  39. <li>Click the Application menu &gt; Search Konsole &gt; Select Konsole to launch a terminal</li>
  40. <li>Continue with the following commands in Konsole
  41. <div class="codeBlock"># set a password if you haven&#39;t already<br />
  42. # enter and confirm a password<br />
  43. passwd<br />
  44. # if emudeck was installed on microSD, run the following to create a symlink in the home directory<br />
  45. # if you&#39;re not sure, navigate to the path in Dolphin, right click and Open Terminal, then run pwd<br />
  46. mkdir ~/Emulation<br />
  47. ln -s /run/media/mmcblk0p1/Emulation/saves ~/Emulation/<br />
  48. # make steamos writable<br />
  49. sudo steamos-readonly disable<br />
  50. # install rclone<br />
  51. sudo -v ; curl https://rclone.org/install.sh | sudo bash<br />
  52. # make steamos readonly<br />
  53. sudo steamos-readonly enable<br />
  54. # verify rclone installed<br />
  55. rclone version<br />
  56. # configure rclone<br />
  57. rclone config<br />
  58. # setup a new rclone remote storage location<br />
  59. n<br />
  60. # enter a name for the remote storage location<br />
  61. EmuDeckSaves<br />
  62. # select the type of storage<br />
  63. # here you can select the storage type to use<br />
  64. # SMB/CIFS in this example<br />
  65. smb<br />
  66. <br />
  67. # follow the prompts to configure the remote storage<br />
  68. # this will vary depending on the storage type selected<br />
  69. # the steps below are for smb<br />
  70. <br />
  71. # enter the smb host<br />
  72. i12bretroDC<br />
  73. # enter the smb username to use<br />
  74. i12bretro<br />
  75. # enter the smb port or press enter to use the default<br />
  76. &lt;%enter%&gt;<br />
  77. # choose a password option<br />
  78. y<br />
  79. # enter and confirm the smb password to use<br />
  80. &lt;%smb password%&gt;<br />
  81. # enter an optional auth domain<br />
  82. i12bretro.local<br />
  83. # enter advanced config<br />
  84. n<br />
  85. # review the summary and confirm<br />
  86. y<br />
  87. # quit rclone config<br />
  88. q<br />
  89. # test the configuration<br />
  90. # if any errors are shown, troubleshoot before moving on<br />
  91. rclone test memory EmuDeckSaves:/EmuDeck/Saves<br />
  92. # if using a subdirectory, add it after the remote storage name<br />
  93. rclone test memory EmuDeckSaves:/EmuDeck/Saves<br />
  94. # run an initial sync<br />
  95. # once the sync completes, verify the contents of the SMB share<br />
  96. rclone bisync --resync --copy-links ~/Emulation/saves EmuDeckSaves:/EmuDeck/Saves</div>
  97. </li>
  98. </ol>
  99. <h2>Scheduling Automatic Sync</h2>
  100. <ol>
  101. <li>Continue with the following steps in terminal
  102. <div class="codeBlock"># create a systemd user config directory<br />
  103. mkdir ~/.config/systemd/user -p<br />
  104. # create and edit a systemd timer<br />
  105. nano ~/.config/systemd/user/sync-emudeck-saves.timer</div>
  106. </li>
  107. <li>Paste the following into the .timer, adjust the OnCalendar value to change from every 15 minutes
  108. <p>[Unit]<br />
  109. Description=Scheduled EmuDeck saves Rclone sync timer</p>
  110. <p>[Timer]<br />
  111. OnCalendar=*:0/15<br />
  112. Persistent=true</p>
  113. <p>[Install]<br />
  114. WantedBy=timers.target</p>
  115. </li>
  116. <li>Press CTRL+O, Enter, CTRL+X to save the changes and exit</li>
  117. <li>Continue with the following steps in terminal
  118. <div class="codeBlock"># create and edit a systemd service<br />
  119. nano ~/.config/systemd/user/sync-emudeck-saves.service</div>
  120. </li>
  121. <li>Paste the following into the .service, updating the two paths in the rclone command to match the source and destionation as needed
  122. <p>[Unit]<br />
  123. Description=Scheduled EmuDeck saves Rclone sync service</p>
  124. <p>[Service]<br />
  125. ExecStart=/usr/bin/rclone bisync --copy-links /home/deck/Emulation/saves EmuDeckSaves:/EmuDeck/Saves</p>
  126. </li>
  127. <li>Press CTRL+O, Enter, CTRL+X to save the changes and exit</li>
  128. <li>Continue with the following steps in terminal
  129. <div class="codeBlock"># start and enable the systemd timer<br />
  130. systemctl enable sync-emudeck-saves.timer --now --user<br />
  131. # list the systemd timers<br />
  132. systemctl list-timers --all --user</div>
  133. </li>
  134. <li>Create some test files in both the SMB share and ~/Emulation/saves and verify the two way sync is working as expected</li>
  135. </ol>
  136. <p>Special thanks to jcnix for the idea <a href="https://github.com/jcnix/emudeck-saves-sync" target="_blank">https://github.com/jcnix/emudeck-saves-sync</a></p> </div>
  137. </div>
  138. </body>
  139. </html>