How to backup to phone? Android as a destination?

i’ve got a lot of free GB on my phone i want to use for backups.

one idea is use duplicati to bckup locally, then sync that local backup folder to my phone using a different software like syncthing. but i don’t want to duplicate the data locally, i don’t have room.

my other idea is to run a webdav / ftp server on my phone? then target that? but idk what webdav even is. and that sounds insecure + battery hungry.

what’s the most simple way to do this?

i just downloaded FTP Server (Free) from F-Droid. duplicati instantly connected to it np. seems good!

1 Like

Very interesting… never thought I’d see someone back up their PC to their phone!

it actually crashed about half way through. and it always crashes. so this isn’t working for me.
i tried ftp, sftp, webdav, and using a bunch of different apps. it all fails before completing, at different points.(and i’m only backing up like 40gb)

i tried simply plugging in my phone via usb and backing up to it as a normal drive, but apparently that’s impossible in 2022 because you can’t mount Android to a drive letter anymore. the path is like: This PC\ONEPLUS A5000\Internal shared storage\ and Duplicati doesn’t like it


Important update: Termux seems to have an issue with Android 11+ writing to sd card. At least on my phone, the phone suggests the sd card has a problem but there’s no problem outside of Termux. However, Termux writes fine on Android 8 to it. Just something to know. Internal on Android 11+ seemed to be fine. 100GB of backups on Android 8 to sd card and all is good. Same as computer to computer SSH. End.

Old but the only one I found via search so adding another way. The same way I do from computer to computer. SSH.

Still testing but working great for a 400MB test backup on Android 12 non-rooted phone.

But, you can use ssh server on Android via Termux. Happens to be that it needs to be done from an F-Droid provided package as well as its the only way to get the start on boot for the updated Termux app unless one builds both from source which I believe should also work.

(They are not the download f-droid buttons in the links but are just below that)

Install Termux and Termux boot

Browse to Termux Android settings for the app and enable permission for storage

Open Termux


$ pkg install openssh
$ passwd
$ sshd -p 1234

Also for path, use a file explorer on the Android device and create a folder to backup to.

And in Duplicati you can ssh into it using sftp(ssh) with ip of Android device, port 1234, username u0_a274 and the password you supplied to passwd. Put the full path into Duplicati. You can then test connection and it should work assuming you have no firewall or other blockage if you have your networking all crazy.

For Termux boot, open Termux, you will create the script at $HOME/.termux/boot/start-sshd and you can use sshd -p 1234 or whatever (see the instructions in Termux boot app to know what to put into the start-sshd file). Start Termux boot and then ssh server will start even after the device is rebooted.

I’ve disabled battery optimizations for the apps as well.

Speeds are quite fast on my phone with 400MB not taking long at all. Also have to test battery usage further but so far its looking great.

24 hour test succeeded. Continued backups. No problems seen. Will be moving onto roughly backing up 100GB+ via two backups next asap.

Unfortunately anyway here - even with open source - requires a level of trust as it opens up the storage to the old way where apps could take data at will. While many of us devs are not that way, many devs are. These apps use old targets that Google allows to circumvent newer safety changes. FYI. You might be able to block the device from the internet as good enough safety via the router if its a device you won’t use the internet with.

By the way, an alternative:

You could use Syncthing to sync your Duplicati backup to the Android device. Syncthing is way too slow to do without a pre-contrainer backup such as Duplicati. You want to heavily minimize the amount of files Syncthing sends because of how badly slow it is which is still an understatement. I didn’t want to add yet another application on my computer for backups so decided not to go this way.

But, this or other sync applications are another way to go. However, also if Duplicati (in this instance) messed up the backup and you sync those backups then two separate backup choices would be broken at the same time which is bad bad bad. Something to think about.