ubackup is an incremental backup tool for Unix. Features are
- ubackup can backup remote directories to a local directory.
- ubackup can backup local directories to a remote directory.
- ubackup can backup local directories to another local directory.
- ubackup can use SSH for remote backup.
- One backup is placed into into
year-month-dayThour:minute:second,millisecond
(datetime in format of ISO-8601) directory. - ubackup uses hard link for incremental backup. If a file is unchanged, ubackup makes a hard link to the previous one.
- ubackup backups not only files itself, but also metadata such as permissions
and owners under
.meta
directories. - ubackup can handle UTF-8 filename.
- ubackup is open source software under the MIT license.
ubackup works on/with
- FreeBSD 9.1/amd64
- flange
tarballs are available at the author's website.
Compiling ubackup needs
- CMake 2.8.11.2
First of all, you must describe settings in configure.conf. configure.conf.sample is a sample of it:
$ cp configure.conf.sample configure.conf $ vi configure.conf
Now is the time to compile:
$ ./configure && make && make install
There are two tools in ubackup -- ubackupme and ubackupyou. ubackupme is one to backup local directories to a remote machine. ubackupyou is a tool to backup remote directories into a local directory.
If you want to backup your local directories to a remote directory, the command which you must use is:
ubackupme ssh hostname srcdirs... destdir
hostname
must be replaced with name of a remote machine.
All arguments from the fourth one but the last are source directoires. The last argument is a destination directory in a remote machine.
To backup remote directories into a local directory, the command is:
ubackupyou ssh hostname srcdirs... destdir
ubackup is also useful to backup local directories into another local directory in an external storage. You can use both of ubackupme and ubackupyou:
ubackupme local srcdirs... destdir ubackupyou local srcdirs... destdir
Results of these two commands are same.
Each directory has a .meta
directory, which contains meta data of files in
the directory. A meta data file of foo
is .meta/foo.meta
. This file has
mode, uid and gid in each line.
Even if you do:
$ cd /foo/bar/baz $ ubackupme local quux /backup
ubackup backups the quux at /backup/timestamp/foo/bar/baz/quux
, not at
/backup/timestamp/quux
. This means that ubackup does not backup only the
given file, but also the parent directoires of it.
ubackup uses CRLF for the line terminator.
Format: DIR name mode uid gid ctime Response: OK or NG
Format: FILE name mode uid gid mtime ctime Response: CHANGED, UNCHANGED or NG
A backuper must memorize name for the next BODY command.
Format: BODY size Response: OK or NG
File body follows after a CRLF. A backupee must specify filename with FILE command previously.
Format: SYMLINK name mode uid gid ctime src Response: OK or NG
Format: THANK_YOU Response: Nothing (This does not mean "Nothing" command)
A backupee declares the end of connection by this command. A backuper disconnects immediately without any responses.
The author is Tomohiko Sumi.