Skip to content

Instantly share code, notes, and snippets.

View brunetton's full-sized avatar
🏠
Working from home

Bruno Duyé brunetton

🏠
Working from home
View GitHub Profile
@JohannesBuchner
JohannesBuchner / rsyncprogress.py
Last active June 18, 2023 18:51
Progress bar for rsync
"""
Progress bar for rsync
========================
Shows file progress and total progress as a progress bar.
Usage
---------
Run rsync with -P and pipe into this program. Example::
import datetime
import exifread
import glob
import sys
import os
import shutil
import fractions
import pyexiv2
from geopy.distance import vincenty
@iangreenleaf
iangreenleaf / rsync-retry.sh
Created January 18, 2010 07:12
rsync with retries
#!/bin/bash
### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
MAX_RETRIES=50