How to set two (or more) devices to back-up to one Pixel

Hello community. Just came across Syncthing a few hours ago and have been searching and reading since to achieve the following.

I would like to use an old Pixel phone to back-up photos from 2-3 other devices. I have several identically names albums on all devices that should all be backed-up to the same corresponding folder. Let’s say that Screenshots from device 1 and Screenshots from device 2 have to both be copied to Screenshots folder on the Pixel.

I have tested and it works but I had to create two different receiving folders on the Pixel that share the same location. And I feel I might be missing something and there could be an easier way how to achieve this.

Any ideas? references? I was only able to find this but the topic is dead.

The sources folders on the left are both set as ‘send only’ while the pixel on the right to ‘receive only’.

At its core, Syncthing is a bidirectional sync tool – keeping a pair of linked folders near-mirror images of one another.

But what you’re trying to do is “merge” folders from Pixel A and Pixel B onto a single folder on Pixel C, which isn’t a scenario that Syncthing supports.

Because the source folders on Pixel A an B are set to “Send Only”, they will forever be out-of-sync with Pixel C as long as Pixel A and B don’t hold the same files (i.e. if Pixel A has file named “pixel_a.jpg” that doesn’t exist on Pixel B).

To avoid issues, it’s best to use unique destination folders, e.g. /storage/emulated/0/Download Sync/Pixel A and /storage/emulated/0/Download Sync/Pixel B.

1 Like

Hi,

As stated by @gadget What you’re trying to do is Not what the software was originally designed to do. Here is something that will work.

Another idea would be to install a free SFTP server on the pixel that you want to be your backup phone and then use a program in the Google Play App Store called Foldersync to synchronize the pictures to the desired folder on your master phone and make it a mirror not a two way sync so all of the pictures from your two primary phones will go into the same folder on the master phone and there won’t be bidirectional synchronization it’ll just take the new photos and put them on your backup phone.

The SFTP server I use on Android from the store is the SSH/SFTP Server - Terminal from Banana Studio.

If you have a memory slot on the phone you can put a large flash drive memory card in the pixel phone that’s the backup machine and that will give you lots of storage on your makeshift server. Even if you don’t have a sd cards log you can put a Large flash drives in the power slot.

If you get a splitter, sometimes referred to as OTG Adapter (On The Go) You should be able to plug in the flash drive and your power charging cord at the same time. See Pic.

Without understanding your distinction of backup vs sync, and your device topography, here is what I think your intention is, and how I would (did) tackle it (modified a bit as you sync one folder I sync my entire phones).

I take screenshots a lot as a throwaway/to-do method on my secondary devices. I don’t want the generating device to keep them, I want to view them on my primary one, and delete them there.

I create a “master” screenshot directory. All screenshots end up here. Viewing and deleting is done from this folder. This folder is created with the screenshots directory as path on the phone. The name should reflect its non-transient nature.

This folder is synced with a non-mobile device. Ideally something that is always on such as a NAS or PC, I use Linux. As you cannot rely on mobile devices to be always syncing (more later). This also satisfies additional requirements (again more later). The partnership is R/W on both ends - you will add/delete screenshots on the primary phone, and also make changes on the PC.

You now have:

Phone:/Pictures/Screenshots <-> PC:/Screenshots.

The path and location may depend on the OS on the phone end and wherever you want on the PC end. You decide the naming.

Next you also create a corresponding sync, from “secondary phone” to PC, for each phone. Similar setup. Both ends must be r/w, as files are added on phone and deleted from PC. Slightly different path on PC:

Phone2:/Pictures/Screenshots <-> PC:/Staging/Phone2Screenshots Phone3:/Pictures/Screenshots <-> PC:/Staging/Phone3Screenshots

Alternatively, you may decide that (1) this is a headache, as I would agree (2) the devices are not hierarchally imporatant, all are subservient to your main device (3) you will never take a screenshot on two phones at exactly the same second, so no file collisions. In that case, share the same folder between them and the PC (3-way sync)

Phone (2 and 3):/Pictures <-> PC:/Staging/PhoneScreenshots

The result is the same. You have a pathway from PC to main phone, and from secondary phones to PC.

What to do on PC:

Now on PC you use a mechanism to move files from the Staging folder(s) onto the main one. This will clear the file from the staging folder (thus secondary phone) and add it to the main phone.

For example you could use FreeFileSync, or shell scripts (Linux), rsync, cron etc. I choose the latter. You may not take screenshots on 2 devices at the same exact second, but some logic should be done to prevent file overwrites.

Why not Phone to Phone?

Even if you disable file watching, and set rescan times to low, that drains battery. I use the Android app’s “Run Conditions” to ensure that Syncthing only runs on AC power. I think this strikes a good balance. In the folder, I set rescan to 1hr (default) but disable watching. I have never faced a situation where I critically needed a screenshot on one device the exact moment I took it on another. Syncing should only occur on battery. If you need to force a sync, plug (or replug) the charger. Need files ASAP - open Syncthing, change run conditions to AC/Battery, sync, change back.

Why PC?

(1) Because of the above run conditions, and wifi dodginess, I can’t guarantee two devices are always on at the same time and can see each other. A PC (NAS) is always on. Moving targets from train, etc.

(2) The file moving utilities are probably more powerful on PC.

Bonus ideas:

  • Find junk “.thumbnails” directories Android may create and exclude them
  • Does your Android gallery pictures to trash when deleting, renaming files to .deleted_Screenshot_XYZ.jpg"? Find the pattern and exclude it
  • Alternatively sync only .jpg files
  • Store the Screenshots folder in your PC’s actual Pictures/Screenshots folder so phone/PC screenshots are all in one place
  • Have a way to automatically rename screenshots to have the same format. This accomodates where different phones have different filenames and mess up the order in the gallery. I am planning something so Windows/Mac/Android screenshots all can be put in one folder.
  • Sync your entire secondary phones. Why stop at screenshots, why not DCIM/Camera, Downloads, etc? Why not sync the entire internal SD so secondary phones all have the same content? You would not want to sync your main phone with this, as your actual content would get pulled over. In the same way as the file moving for screenshots, you would move files from your secondary Downloads (etc) to the phone one via the PC. So if I grab my secondary phone, snap some pics, download a document to fill, take some screenshots, they make it over to my main one (or PC)
  • In this scenario you’d want robust exclude patterns to prevent huge amounts of android junk from polluting everything.

Unfortunately that does not work with Google Photos. It does not see photos on external drives. There is a way but the phone has to be rooted and run command lines every time to attach the storage.

I will try to see if with that app I can mirror two sources into one and how it works. So far how I tried above it works with the advantage that after I delete them from the main 2 phones they are also removed from the pixel

Thank you for the time to reply, I will read carefully and see if i can use any of the knowledge.

Hi,

Correct Google photos doesn’t see a large Drive attached to your phone. I was suggesting it as a storage location on your pixel phone server as a way to increase the storage capacity it would not be directly interacting with Google photos so that is not an issue. It’s simply your backup Drive and if you use SFTP server on the phone you can share that whole drive out to the other devices and then use a program like roundsync to one way copy the photos from your two android devices to the backup phone.

Roundsync can do a copy from the left side to the right side and it won’t delete anything on the destination.

If you look at the picture I have chosen the option called copy from source to destination so it takes anything that is new or changed and copies it to your backup device. If you delete one photo or old photos on the source and run the copy command it will not delete anything from your backup Drive so you can take 100 photos back them up with the copy command in round sync and know that you can delete those photos from your primary phone without having to worry about them being deleted from your backup .

Yes but the ‘back-up’ device you call is actually a Pixel - it has limited storage. It’s purpose is only to upload the photos to Google Photos and after they can be deleted. The source phones will be (long term) back-up separately to a different network drive/location. It’s like this: I take a lot of photos with my personal and work phones. I still want to access old photos from them - so I do that by searching in Google Photos account. Therefore new photos should get copied to the Pixel (which upload them to the cloud) and after that I move the originals (from the source phones) to the long term back-up location. What i wrote in the initial post seems to work (even thought the app was not intended for this purpose). So it works because I noticed that once files are (re)moved from the source phones, the files also dissapear from the Pixel and therefore clearing it’s limited storage space. So if I do the remove after enough time, the pixel would get the chance to sync with the cloud.