Git Product home page Git Product logo

rsync-script's Introduction

rsync-script

This repository contains a collection of shell scripts for using rsync to perform efficient file transfers and backups across multiple machines.

Usage

This repository contains several useful shell scripts for performing various rsync tasks. Here are the list of the scripts and their purposes:

  • rsync-android: This script performs a backup of android internal storage data to external drive.
  • rsync-termux: This script performs a backup of android internal storage data to external drive using termux in Android device.

Prerequisites

To use these scripts, you will need:

  • A Unix-like operating system, such as Linux, macOS, or FreeBSD
  • The rsync utility, which is pre-installed on most Unix-like systems.
  • Basic familiarity with the terminal.

Scripts and config variables

  1. rsync-android : A shell script to backup android internal storage data to external drive. uses 'Android File Transfer For Linux' to mount Android internal storage as mtp. Make sure to configure it first.

Before executing the script, Replace the config variables as per your needs:

mtpDIR : mtp mount directory

ExtDrive : Path of External Drive

DESTINATIONDIR : Destination path in External Drive

EXCLUDES : excludes file. rsync_excludes.txt- this contains a wildcard pattern per line of files to be excluded.

BackupDirFile : BackupDir.txt file - this contains per line of directories to be backed up.

  1. rsync-termux : A shell script to backup android internal storage data to external drive via termux.
  • Install termux app.
  • Install rsync package by excuting:
    pkg install rsync
  • Install rsync-termux script
    mkdir -pv ~/home/local/bin
    cd ~/home/local/bin
    curl https://raw.githubusercontent.com/dhacommas/rsync-script/main/rsync-termux > rsync-termux
    

Before executing the script, Replace the config variables as per your needs:

configDIR : config directory in sdcard path which contains BackupDir.txt and rsync_excludes.txt

ExtDrive : Path of External Drive

DESTINATIONDIR : Destination path in External Drive

EXCLUDES : excludes file. rsync_excludes.txt- this contains a wildcard pattern per line of files to be excluded.

BackupDirFile : BackupDir.txt file - this contains per line of directories to be backed up.

  1. rsync-linux : A shell script to backup linux machine data to external drive.

Before executing the script, Replace the config variables as per your needs:

ExtDrive : Path of External Drive

DESTINATIONDIR : Destination path in External Drive

EXCLUDES : excludes file. rsync_excludes.txt- this contains a wildcard pattern per line of files to be excluded.

BackupDirFile : BackupDir.txt file - this contains per line of directories to be backed up.

Installation

To install these scripts, simply clone the repository:

git clone https://github.com/dhacommas/rsync-script.git

ssh:

git clone [email protected]:dhacommas/rsync-script.git

Be sure to replace the config variables as per your needs before executing the script.

To use any of these scripts, simply navigate to the directory containing the script and run it. For example:

cd rsync-script
chmod +x rsync-android
./rsync-android

Add the script path to PATH to execute from anywhere. (.bashrc)

termux:

cd ~/home/local/bin #location of `rsync-termux` script
chmod +x rsync-termux
./rsync-termux

or Add the script path to PATH to execute from anywhere. (bash.bashrc)

Contributing

If you find a bug or have a suggestion for a new feature, please open an issue or create a pull request.

License

This repository is licensed under the GNU General Public License v3.0

@dhacommas

@EphemeralG

rsync-script's People

Contributors

dhacommas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.