Skip to content

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

License

Notifications You must be signed in to change notification settings

dhacommas/rsync-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages