Skip to content

Instantly share code, notes, and snippets.

View aortbals's full-sized avatar

Aaron Ortbals aortbals

View GitHub Profile
@aortbals
aortbals / dispatch.py
Last active October 20, 2023 16:09
Synchronize two folders using python.
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
@aortbals
aortbals / rsync_time_machine.sh
Created March 5, 2013 18:10
Time machine backup via rsync for any unix machine.
#!/bin/bash
# Title: rsync_time_machine.sh
# Description: Time machine backup via rsync for any unix machine
# Usage:
#
# - Set the following variables:
# `HOME`: the home directory on the local machine to be backed up
# `HOST`: the SSH destination to send the backup to
# `REMOTEBACKUPDIR`: the location on the remote destination to store the backup