Giter Club home page Giter Club logo

termux-gdrive-backup's Introduction

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

termux-gdrive-backup's People

Contributors

christiangarcia0311 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.