RemoteRsync.sh is a Bash script designed to facilitate the process of synchronizing directories to a remote server using rsync. The script offers a user-friendly way to input and store configuration details, making it easy to reuse the settings for future sync operations.
- Configuration Management: Load configuration from a file (
RemoteRsync.conf) or prompt the user for input if configuration details are missing. - Seamless Resumption: Utilizes
rsyncfeatures to resume interrupted transfers, log details of the transaction, and show progress. - Automated Sync: Automatically initiates the sync process using the configured parameters.
-
Clone Repository
git clone <repository_url>
-
Navigate to the Script Directory
cd <repository_directory>
-
Make Script Executable
chmod +x RemoteRsync.sh
-
Run the Script
./RemoteRsync.sh
Upon first run, if the configuration details are missing, the script will prompt you to input the necessary details:
- Source Directory: The local directory you wish to sync.
- Destination Username: The username on the remote host.
- Destination Host: The remote host's address.
- Destination Directory: The directory on the remote host where the files will be synchronized.
- Log File Path: Path to the log file for capturing rsync operations.
These details are saved in the RemoteRsync.conf file for future use.
SRC_DIR="/path/to/source"
DEST_USER="username"
DEST_HOST="hostname"
DEST_DIR="/path/to/destination"
LOG_FILE="/path/to/logfile"- Ensure you have the necessary permissions and correct paths set up for both local and remote directories.
- Verify that
rsyncis installed on both the local and remote systems. - You may need to configure SSH access to the remote server for this script to work without requiring password inputs each time.
This project is licensed under the MIT License. See the LICENSE file for details.
This readme provides a concise overview and instructions for using the RemoteRsync.sh script effectively. Feel free to reach out if you have any questions or need further assistance.