I am running a Raspberry Pi 4 Model B as a VPN Gateway with OpenVPN. On my Samsung S8, I have the app OpenVPN for Android installed and the VPN tunnel to my home network works like a charm.

What I want to achieve now is the following: As my Raspberry Pi has an SD card with huge storage, I want to copy / backup all my images I have on my Android phone to this SD card with the folders being named just like they are on my Android phone.

I saw that rsync can be used maybe. However, I wasn't able to find a proper tutorial for my usecase: I don't want the files on the SD card in the Raspberry to be deleted - never, even when they are deleted on the phone - but only the newer images to be uploaded.

Any idea how I can achieve this?

  • 3
    rsync only deletes if you tell it to.
    – goldilocks
    Nov 27, 2019 at 14:41

1 Answer 1


I solved it and thank you goldilocks for your answer.

Android Side

I installed the app Rsync Wrapper on my Samsung and configured it with the following parameters:

Source: /storage/WXYZC-ABCD/DCIM/Camera/

Destination: [email protected]:~/userS8/

Option: -r --ignore-existing --progress -e "ssh -l username -i /data/user/0/net.letscorp.rsyncwrapper/files/00a00b00-1111-22c3-44de-5fgg6hi7j888.key -y"

The option tag will be created more or less automatically by Rsync Wrapper when you create the SSH key pair.

Raspberry Side

sudo apt-get install rsync

Create the directory .ssh and the file authorized_keys if not already there in ~ (home) username:~/.ssh/authorized_keys

Put the public key from the app Rsync Wrapper into the file authorized_keys and test it with a dry run on Rsync Wrapper.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.