title: Backup Android to NAS with Rsync
body: <p>How to backup an Android device (Not Rooted)  to a NAS with Rsync over SSH ?</p>
  
  <p>Here is a little Howto that can help :</p>
  
  <ol>
  <li>Configure Keys
  Either use dropbear both side or create Open ssh keys and convert the private key to dropbear :</li>
  </ol>
  
  <blockquote>
  <pre><code>ssh-keygen -t rsa -f rsync.key
  sudo apt-get install dropbear
  /usr/lib/dropbear/dropbearconvert openssh dropbear rsync.key rsync.key.db
  </code></pre>
  </blockquote>
  
  <p>Copy <code>rsync.key.pub</code> to the server <code>.ssh/authorized.keys</code>
  Copy private key <code>rsync.key.db</code>to the Android device (where you want) and the public key to the </p>
  
  <ol start="2">
  <li>Install Syncopoli (great opens source software thanks to the author !)</li>
  </ol>
  
  <p>If you are running Android on arm-V7-a, you can download apk here :
  <a href="https://f-droid.org/en/packages/org.amoradi.syncopoli/" rel="nofollow noreferrer">https://f-droid.org/en/packages/org.amoradi.syncopoli/</a></p>
  
  <p>If you are running Android on arme-V8-a, you have to clone the git repository git clone <a href="https://gitlab.com/fengshaun/syncopoli.git" rel="nofollow noreferrer">https://gitlab.com/fengshaun/syncopoli.git</a>, add the jni sources from the source tarball  on f-droid  and compile an new apk with Android Studio.</p>
  
  <ol start="3">
  <li>Configure Suncopoli
  In the parameters change :
  
  <ul>
  <li>sever address to your NAS IP</li>
  <li>protocol to SSH</li>
  <li>private key to the absolute path to the private key on your Android device (i.e <code>/storage/emulated/0/data/rsynch.key.db</code>)</li>
  </ul></li>
  </ol>
  
  <p>In the Action page, create a task : 
  - Local to remote (for backup on NAS)
  - set a profile name
  - set the source folder to backup (i.e. <code>/storage/emulated/0/DCIM/Camera</code>)
  - set a destination (i.e. <code>/media/share/camera</code>)</p>
  
  <p>And run the task .. files should appear on your NAS  </p>