Using Openrsync

OpenRsync is OpenBSD's rewrite of rsync. openrsync is designed to be lightweight and simple. It may, however, be a little buggy.

WARNING: If your filesystem is being actively written to, data corruption may occur.

OpenRsync Primer

To back up the file /path/to/file on with username to the current directory:

$ openrsync -a ./

This table explains the most common options:

a(a)rchive mode, shorthand for Dgloprt
DTransfers (D)evice and special files
gSets (g)roup to match the source
lTransfers symbolic (l)inks
oSets (o)wner to match the source (needs root)
pSynchronizes (p)ermissions
tSynchronize (t)imestamps
vIncrease (v)erbosity

If you have multiple files, you can use the shorthand of :/path/to/second/file:

$ openrsync -a :/path/to/second/file ./

This copies both /path/to/file and /path/to/second/file from to your current local directory.

openrsync can also copy folders recursively. To see each file copied, turn on verbosity with -v. In the next example, we copy from /path/to/folder on the local system to /path/to/destination in

$ rsync -av /path/to/folder

Quick Check

Before you backup your files, make sure you have enough disk space. To see how much space it will take, and how much you have available, run:

$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M    111M    844M    12%    /
/dev/sd0k      192G   28.7G    153G    16%    /home
/dev/sd0d      3.9G   22.1M    3.7G     1%    /tmp
/dev/sd0f     12.3G    7.3G    4.4G    63%    /usr
/dev/sd0e     14.7G   41.2M   14.0G     0%    /var

Backing up /home will require at least 28.7G of space.

$ openrsync -av /dest/path/

This will copy everything in /home/username on into /dest/path/.