Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Filesystems

Osync and DiffTree

Submitted by on July 8, 2016 – 1:49 am

Think of osync as a kind of rsync that is more suited for making backups. While rsync certainly has more options, osync takes a lot of the complexity out of writing a backup script with a few options that are perfectly suited for such tasks. The dt is a great tool for comparing contents of two or more folders. It can be very useful working in concert with osync to keep track of any changes.

osync installation from a tarball

cd /tmp
wget -q https://github.com/deajan/osync/archive/v1.01.tar.gz -O - | tar xz
cd osync*
./install.sh

osync installation with git
cd /tmp
git clone https://github.com/deajan/osync
cd osync*
./install.sh

Make a more convenient link:
ln -s /usr/local/bin/osync.sh /usr/bin/osync

Example: mirror /etc to /etc_mirror:
CREATE_DIRS=yes osync --initiator="/etc" --target="/etc_mirror"


 

Install dt from a tarball

cd /tmp
wget -q https://github.com/rondilley/difftree/releases/download/v0.5.9/difftree-0.5.9.tar.bz2 -O - | tar xj
cd difftree*
./configure && make && make install

Install dt with git
cd /tmp
git clone https:/github.com/rondilley/difftree.git
cd difftree*
./configure && make && make install

Example: compare /etc and /etc_mirror:
dt -e .osync_workdir /etc /etc_mirror 2>/dev/null

 

Print Friendly, PDF & Email

No Comment »

1 Pingbacks »

Leave a Reply

%d bloggers like this: