Backups... yeah i know.. (Android to Windows)

Hey Guys,

i am tasked to find a solution to backup photos made by my clients android smartphone to her (windows) Desktop Computer.

The client isnt the youngest anymore and not really tech savvy so that i want it to automate it as much as possible.

Someone on reddit i think… suggested SyncThing and that kinda works out as long as my client doesnt start to delete photos on the phone that she might have wanted to keep on the Desktop.

Is there a way to configure SyncThing in such a way that would prevent deletion on the Desktop?

Do you have other tools in mind? has to work with some Samsung AXX phone running Android 9…ish? (10?) and Windows 7 32Bit in the worst case.

Thank you in Advance!

1 Like

There are hacks to achieve that if you search around, but I wouldn’t suggest using them unless you’re a power user who knows exactly that that’s what you want, and especially not to a non-tech-savvy person.

The easiest method here would probably be to simply enable (trash can) file versioning for the folder in Syncthing on the desktop. Then, if the photos do get deleted, the person can just restore them from the versions folder (and then move to another location on the computer so that they don’t sync back to the phone).

Android is still rather new, Windows 7 32-bit may limit some choices though. Syncthing does have great cross-platform compatibility :slightly_smiling_face:. I use it on a Windows 10 32-bit machine myself.

Just use Syncthing for the file transfer, then move the photos out of the synced folder regularly by a scheduled job (e.g. rsync or robocopy). That can be made to apply only to files older than X months for example, so the most recent dataset stays available on the phone, but older stuff gets cleaned up from there. Accidental deletions on the phone can be handled by splitting the scheduled process in two stages: Copy everything to the “archive” folder on the PC (always), then delete all overaged files from the synced folder, which propagates to the phone. That leaves a small chance of accidental deletion on the phone, depending on how frequently you let the scheduled job run.

1 Like

For this use case I use syncthing to get the files from Android to desktop, then restic on desktop to backup the data. Since restic doesn’t delete any data during backup runs it means accidental deletions on the phone won’t disappear. As with all backups, the customer needs to understand that it needs attention and maintenance, and that they’re given the option of paying for this on a regular basis or accepting the risk.

1 Like

Hey again,

The easiest method here would probably be to simply enable (trash can) file versioning for the folder in Syncthing on the desktop. Then, if the photos do get deleted, the person can just restore them from the versions folder (and then move to another location on the computer so that they don’t sync back to the phone).

I will probably go for this, its certainly not perfect but ensures that my client has a backup if she decides to delete photos on her phone.

Just use Syncthing for the file transfer, then move the photos out of the synced folder regularly by a scheduled job (e.g. rsync or robocopy). That can be made to apply only to files older than X months for example, so the most recent dataset stays available on the phone, but older stuff gets cleaned up from there. Accidental deletions on the phone can be handled by splitting the scheduled process in two stages: Copy everything to the “archive” folder on the PC (always), then delete all overaged files from the synced folder, which propagates to the phone. That leaves a small chance of accidental deletion on the phone, depending on how frequently you let the scheduled job run.

Im pretty sure my client wants to have all of her photos on her phone and on der desktop computer, i could however use your suggestion as a “further” backup plan which i might will do.

Thank you so far i´m sure i will make it work somehow, if someone pulls a magical app out of the hat that exactly does what i need i would still appreciate a mention of said app ofcourse.

As with all backups, the customer needs to understand that it needs attention and maintenance, and that they’re given the option of paying for this on a regular basis or accepting the risk.

Problem is my client up until now asked her son in law to copy her photos via USB about once or twice a year so she would probably be no good with me on the phone guiding her.

While a Taskscheduler routine running restic absolutely does solve the problem i want to keep it as simple as possible.

Good suggestion though, thank you.

1 Like

yup, some folk are OK following written instructions, some are fine paying for the maintenance, others accept it’s an at-risk solution.

I think one “smart” solution without relying on external tools could also be to set up external file versioning with a simple Batch or PowerShell script (which can even be embedded into Syncthing inline) that does the following:

  1. Renames the file (e.g. by adding _PC to the name).
  2. Adds the renamed filepath to the ignore patterns.

This way the file stays on the desktop but doesn’t sync back to Android. The rename operation is required, so that Syncthing believes that the file has been deleted by the external versioning script.