This script is designed to continuously sync video recordings (.mov
files) from a local directory to Google Drive. It's particularly useful for situations where you need to upload large video files as they're being recorded, ensuring that the upload is nearly complete by the time the recording finishes.
- Continuous syncing of
.mov
files as they're being recorded - Efficient handling of large files
- Cleanup of temporary files
- Graceful interrupt handling
- Detailed logging of activities
- Bash shell
- rsync
- rclone (configured for Google Drive)
- Navigate to the script directory: cd vor-sync-script
- Make the script executable: chmod +x sync_recordings.sh
- Run the script: ./sync_recordings.sh
The script will start syncing files from the specified local directory to Google Drive. It will continue running until interrupted with Ctrl+C.
Edit the following variables at the top of sync_recordings.sh
to match your setup:
LOCAL_RECORDINGS
: Path to the directory containing the video recordingsTEMP_COPY_BASE
: Path to a temporary directory for intermediate copiesREMOTE_PATH
: rclone path for the Google Drive destinationSYNC_INTERVAL
: Time in seconds between sync cyclesSTABLE_TIME
: Time in seconds between stability checksSTABLE_CHECK_COUNT
: Number of times to check for stability
The script logs its activities to a file specified by LOGFILE
. You can monitor this file to track the script's progress and diagnose any issues.
Contributions are welcome! Please feel free to submit a Pull Request.