The scripts are designed to back up photos and videos from your phone via a remote server to your OG Pixel. It uses rsync to efficiently transfer only new or changed files, saving bandwidth and time. The scripts also check for files deleted on the server (or are backed-up to Google Photos and therefore being deleted locally) and moves the corresponding files on your phone to a backup directory. This prevents accidental permanent deletion of your photos and videos.
- Take photos/videos on your main phone
- execute the script
- photos/videos are uploaded to the remote server
- Syncthing Docker container syncs the photos/videos to the Pixel / Pixel XL
- Pixel / Pixel XL will upload the photos/videos to Google Photos
- Automate will auto 'Free Up Space' after defined time period
- At next script execution all 'Freed up images/videos' will be moved into backup directory on the phone (can be changed ofc to be deleted).
- repeat
- Install Termux
- Install Termux:API
- Install Termux:Widget
- Activate the storage in
Termux with
termux-setup-storage
- Activate background activity in
Termux with
termux-wake-lock
- Install the dependencies in Termux shell
apt install rsync openssh jq
. - Create a SSH key for passwordless login
- Copy private key into local directory on the phone
$HOME/.ssh/id_rsa
- Copy both scripts into
$HOME/.shortcuts/
folder - Adjust the variables in scripts
- Use Termux:Widget to create a shortcut of the script to your homescreen
- Execute both scripts once that the timestamp files are being created
- Create new Linux user for the following
- Setup Syncthing Docker Container for example the one from LinuxServer.io
- Remeber to set the correct ownership:
chown -R user:user /path/to/dir
Read through these Reddit posts, there you will find all you need to know: