rsync_tmbackup tips & trouble shooting

Backing up files with rsync-time-backup

The rsync_tmbackup.sh offers Time Machine-style backups using rsync. It creates incremental backups of files and directories to the destination of your choice. The backups are structured in a way that makes it easy to recover any file at any point in time.

Command examples for executing backups.

made into executable by running mv rsync_tmbackup.sh /usr/local/bin/rsync_tmbackup

# Syntax
rsync_tmbackup SRC DEST exclusionsFile

# Example 1
rsync_tmbackup ~/R_library/ /Volumes/DATA/R_library/

# Example 2
rsync_tmbackup /Volumes/DATA/Seafile /Volumes/TimeMachine/Temp.Storage/Seafile/ /Volumes/DATA/seafile.backup.exclusions
# See below for seafile.backup.exclusions

Example exclusion file. More info here.

- /.seafile-data
- /.seafile-data/*

To convert an existing backup to rsync-time-backup

# Get to the backup destination with you pre-existing backup
cd /Volumes/BackupDestination/

# rename your old backup folder
mv Folder Folder.bak

# Initnalize an empty directory with rsync_tmbackup.sh
mkdir Folder
cd Folder
mkdir -p -- "." ; touch "./backup.marker"

# Initiate backup
# I've run: chmod +x rsync_tmbackup.sh; mv rsync_tmbackup.sh /usr/local/bin/rsync_tmbackup

rsync_tmbackup ~/Source/Folder/ /Volumes/BackupDestination/Folder/
#[!] As soon as backup starts hit Ctrl + C to stop the backup
Ctrl + C

# remove marker for the in-progress backup
rm backup.inprogress 

# remove the newly created backup folder where rsync_tmbackup.sh started to cipy files
rm -rf <current YYY-MM-DD-HHMMSS> 

# Now get your files from your previous backup to the current working directory.
# [!] Use 'cp' if you want to be really safe with your data and then remove the ../Folder.bak after your backup has worked out
mv ../Folder.bak ./ 

# Rename your folder to the YYY-MM-DD-HHMMSS of last backup
# Put yesterday's date up if you don't know/remember/figure out.
mv Folder.bak "2019-09-11-110134"
ln -s "2019-09-11-110134" latest

# Run rync_tmbackup.sh
rsync_tmbackup ~/Source/Folder/ /.

# rync_tmbackup.sh will go through listing every file, but if you monitor your network/disk usage you'll see that you're not transferring files and in the ouput you'll mostly see something like:
# >f..tp...... /your/files/here.txt

# From next time onwards you just need to run:
rsync_tmbackup ~/Source/Folder/ /Volumes/BackupDestination/Folder/
Previous
Next