Skip to content

Termux Gdrive Backup is an automated android backup system design to synchronize your termux files with google drive.

Notifications You must be signed in to change notification settings

christiangarcia0311/termux-gdrive-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge

Termux Gdrive Backup

logo An automated android backup system design to synchronize your termux files with google drive. This project contains five primary scripts:

  • backup.sh: performs the actual backup of fhe file using rclone.
  • auto_backup.sh: sets up an automated backup schedule using cron jobs.
  • auto_disable.sh: disables the automated backup by removing cron jobs and startup scripts.
  • setup_gdrive.sh: configures rclone to work with Google Drive.
  • install.sh: Installs necessary packages if they are not already installed.

Requirements

Termux App

Google Account

Installation and Setup

  1. Install git.
    pkg install git -y
  1. clone the repository.
    git clone https://github.com/christiangarcia0311/termux-gdrive-backup
  1. configure project directory.
    cd termux-gdrive-backup
  1. install required packages.
    sh install.sh
  1. configure gdrive as a remote.
    sh setup_gdrive.sh

see Google Drive Setup for guide.

  1. edit backup script.

open backup.sh and replace <foldername_existed> with the name of the folder you want to back up in termux.

    LOCAL_DIRECTORY="/data/data/com.termux/files/home/<foldername_existed>"
  1. run the setup script.

enable automated backup

the backup.sh script will run daily at 6 PM (default), synchronizing the specified termux directory with your google drive.

automatically trigger backup by running:

    sh auto_backup.sh

you can modify cron job time schedule in script by removing # in auto_backup.sh file.

manually trigger a backup by running:

    sh backup.sh
  1. restart termux and start cron service.

start service by running:

    sv up cron
  • check status sv status cron
  • check list crontab -l
  • stop service sv down cron

disable automated backup

to disable the automated backup, run auto_disable.sh:

   sh auto_disable.sh

Logs

you can see backup logs in:

/data/data/com.termux/files/home/rclone.log

Notes

  • ensure you have internet access when the backup is scheduled to run.
  • modify the cron job schedule in auto_backup.sh if you prefer a different backup time.

Troubleshooting

  • verify rclone is correctly configured and can access google drive.
  • ensure the paths in the scripts are correct.
  • check rclone.log for detailed error messages.

Contributions

Feel free to open issues or submit pull requests for improvements and bug fixes.

License

Static Badge

Author

Static Badge

About

Termux Gdrive Backup is an automated android backup system design to synchronize your termux files with google drive.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages