10 years agoAvoid busy loop on rsync exit status 12 or 13.
Andre Noll [Fri, 12 Mar 2010 14:47:07 +0000 (15:47 +0100)]
Avoid busy loop on rsync exit status 12 or 13.

Although we set the next snapshot time to now + 60 seconds in case
rsync exits with exit status 12 or 13, we miss to check this time
barrier in case the snapshot creation status is HS_NEEDS_RESTART.

Fix this by adding an additional check in the switch() statement
of the select loop. As this change would trigger the assertion

snapshot_creation_status == HS_READY

in next_snapshot_is_due(), remove this assertion.

10 years agoFix create mode in case no post-create hook is given.
Andre Noll [Fri, 12 Mar 2010 13:32:17 +0000 (14:32 +0100)]
Fix create mode in case no post-create hook is given.

Without the patch, dss would hang forever waiting for the post-create
hook to die.

10 years agoIntroduce --no-resume.
Andre Noll [Mon, 1 Feb 2010 09:21:35 +0000 (10:21 +0100)]
Introduce --no-resume.

If the dss daemon (or the rsync process) is killed while a snaphot
is being created, e.g. because of a server shutdown, the latest
snapshot remains incomplete until it is removed by the usual shapshot
pruning mechanism.

This patch changes the snapshot creation behaviour if the
most recently created snapshot happens to be incomplete and the
new --no-resume option is not given. In this case the directory
of the incomplete snapshot is reused as the destination directory
for the the new snapshot.

This change saves disk space and reduces the snapshot creation time,
depending of course on how far the previous rsync process got before
it was interrupted.

10 years agoFix two typos in comments.
Andre Noll [Thu, 3 Sep 2009 19:29:29 +0000 (21:29 +0200)]
Fix two typos in comments.

10 years agoProperly invalidate create_pid also for the post-create hook.
Andre Noll [Fri, 28 Aug 2009 13:23:57 +0000 (15:23 +0200)]
Properly invalidate create_pid also for the post-create hook.

If the process associated with the create_pid dies, handle_sigchld()
investigates snapshot_creation_status to tell whether the pre-create
hook, the rsync process or the post-create hook has died.

In the first two cases, handle_pre_create_hook_exit() and
handle_rsync_exit() are called, respectively. Both functions correctly
invalidate create_pid (by resetting it to zero).

However, the post-create hook handling code misses to reset
create_pid. This causes dss to send SIGTERM to this pid on exit,
which might be fatal as the pid might have been reassigned to some
unrelated process in the meanwhile.

Fix this bug by moving the invalidation of create_pid to the end of
the "if (pid == create_pid)" clause, which even saves a line of code.

Many thanks to Sebastian Stark who pointed out that bug.

10 years agoDump the dss configuration on startup and on SIGHUP.
Andre Noll [Fri, 28 Aug 2009 11:42:51 +0000 (13:42 +0200)]
Dump the dss configuration on startup and on SIGHUP.

This makes it possible to look at the current dss configuration
(which may differ from what is contained in the config file).

This feature is handy for the users of dss and it helps to debug the
dss code.

10 years agoImprove error diagnostics.
Andre Noll [Fri, 28 Aug 2009 09:28:57 +0000 (11:28 +0200)]
Improve error diagnostics.

When parsing the command line options we must not error out if a
required option was not given because that option might be specified
in the config file. Therefore we have to call cmdline_parser_ext()
with params->check_required = 0.

However, if --config-file is not given and the default config file
(~/.dssrc) does not exist, we end up with no check for required
options at all.

In particular, if the required --dest-dir option is not given,
conf.dest_dir is NULL and we call chdir(NULL) which returns EBADADRESS
at least on Linux. This causes dss to print the error message

Aug 28 11:35:07 main: Bad address

which is not really helpful. Fix this shortcoming by calling
cmdline_parser_ext() _again_ if no config file was read by
parse_config_file(). This second call uses params->check_required =
1, so that a proper error message is printed if any required options
are missing.

In the above example, the output changes to

./dss: '--source-dir' option required
./dss: '--dest-dir' option required

which is much better.

10 years agoImprove next_snapshot_is_due().
Andre Noll [Fri, 28 Aug 2009 09:12:30 +0000 (11:12 +0200)]
Improve next_snapshot_is_due().

Currently it's a bit weird how next_snapshot_is_due() decides whether
the next snapshot time has to be (re-)computed:

On startup, next_snapshot_time is zero as it is declared

next_snapshot_is_due() checks whether next_snapshot_time is
greater than the current time. If yes, then next_snapshot_time
needs not be updated and the function returns false.

Otherwise (e.g. if it is called for the first time),
next_snapshot_time is recomputed, next_snapshot_is_due()
checks again if it is greater than the current time and
returns false if it is, true otherwise.

Consequently, dss computes the next snapshot time twice per snapshot.
Moreover, it compares next_snapshot_time twice against the current time
where one comparison would suffice. The code is thus less efficient
and harder to understand than necessary. This patch addresses both
issues. It introduces the two trivial helper functions

next_snapshot_time_is_valid() and invalidate_next_snapshot_time().

The former function simply tests next_snapshot_time against zero. It
is called from next_snapshot_is_due(). If it returns false, the new
compute_next_snapshot_time() is called (which makes next_snapshot_time
valid). Next, the usual comparison against the current time is

invalidate_next_snapshot_time() sets next_snapshot_time to zero. It
is called from pre_create_hook() and from handle_sighup(), the latter
call is necessary because changes in the config file might lead to
different snapshot creation times.

10 years agoSimplify computation of next snapshot time.
Andre Noll [Thu, 27 Aug 2009 14:27:29 +0000 (16:27 +0200)]
Simplify computation of next snapshot time.

Using an int64_t rather than a struct timeval for the next snapshot time
makes the code simpler and more readable as we don't have to use the
tv_xxx() functions to perform manipulations.

10 years agoFix off-by-one bug in find_outdated_snapshot().
Andre Noll [Thu, 27 Aug 2009 12:55:02 +0000 (14:55 +0200)]
Fix off-by-one bug in find_outdated_snapshot().

The man page sayeth:

"dss removes any snapshots older than n times u",

where n is the number of unit intervals and u is the duration of
a unit interval. As intervals count from zero, this means that a
snapshot should be considered outdated if its interval number
is greater _or equal_ than n.

However, the current code only removes snapshots in intervals
strictly greater than n. Fix this bug and clarify the documentation.

10 years agoMake snapshot creation trump snapshot removal.
Andre Noll [Wed, 26 Aug 2009 11:24:12 +0000 (13:24 +0200)]
Make snapshot creation trump snapshot removal.

This patch changes the behaviour of dss in case the following three
conditions are all met:

(1) There is at least one snapshot which could be deleted
    (orphaned, redundant, outdated).
(2) Disk space is not low.
(3) A new snapshot is due.

A common case where these conditions are fulfilled is when dss is
started after it was not running for some time, for example due to
a server crash on Friday evening...

In this situation the old code created a new snapshot only after all
orphaned/redundant/outdated have been removed, which can take hours
and is not what one usually wants to happen in the above mentioned
scenario. Instead, it is desirable to create a new snapshot ASAP,
and only after this snapshot has been created, the removal of old
snapshots should take place.

This patch implements this behaviour and goes even one step further:
If disk space is not low and a new snapshot is due or being created,
dss won't trigger snapshot removal any more.

Another positive side effect of this change is that snapshot creation
times become more stable since the rsync process will only be
interrupted by a rm process if disk space is low.

10 years agoMove check for low disk space to try_to_free_disk_space().
Andre Noll [Mon, 24 Aug 2009 08:34:46 +0000 (10:34 +0200)]
Move check for low disk space to try_to_free_disk_space().

The value is only used there, so move the check to this function.

11 years agodss-0.1.3. v0.1.3
Andre Noll [Mon, 6 Jul 2009 13:55:13 +0000 (15:55 +0200)]

11 years agoChange copyright year from 2008 to 2009.
Andre Noll [Fri, 3 Jul 2009 15:03:39 +0000 (17:03 +0200)]
Change copyright year from 2008 to 2009.

A bit late, but better late than never.

11 years agoTry harder to avoid removing the reference snapshot.
Andre Noll [Mon, 29 Jun 2009 09:36:25 +0000 (11:36 +0200)]
Try harder to avoid removing the reference snapshot.

With the old code, it was possible that dss decided to remove the
snapshot which is currently being used as the hardlink directory for
the current rsync process. This patch changes the behaviour so that
reference snapshots are never removed.

The downside of this approach is of course that it is now easier to
fill up the disk..

11 years agoDon't remove the last snapshot unless disk space is low.
Andre Noll [Mon, 8 Jun 2009 06:15:18 +0000 (08:15 +0200)]
Don't remove the last snapshot unless disk space is low.

11 years agoDon't busy-loop if pre-create hook returns non-zero.
Andre Noll [Mon, 8 Jun 2009 05:57:30 +0000 (07:57 +0200)]
Don't busy-loop if pre-create hook returns non-zero.

Sleep at least one minute before retrying.

11 years agoFix removal of orphaned snapshots.
Andre Noll [Sun, 7 Jun 2009 19:44:50 +0000 (21:44 +0200)]
Fix removal of orphaned snapshots.

These were detected but not removed due to the goto jumping to the
wrong label.

11 years agoImprove documentation of the remove hooks.
Andre Noll [Sun, 7 Jun 2009 19:16:41 +0000 (21:16 +0200)]
Improve documentation of the remove hooks.

11 years agoClean up snapshot removal logic.
Andre Noll [Thu, 4 Jun 2009 11:47:35 +0000 (13:47 +0200)]
Clean up snapshot removal logic.

Replace the remove_xxx_snapshot() functions by find_xxx_snapshot()
and start the actual removal in the caller. This simplifies the
code a bit and makes it much more readable. It also simplifies the
--dry-run handling for com_prune().

11 years agoRemove orphaned snapshots first if disk space is low.
Andre Noll [Fri, 29 May 2009 20:09:06 +0000 (22:09 +0200)]
Remove orphaned snapshots first if disk space is low.

If the dss process gets killed, an orphaned snapshot might result.
Detect this case and prefer to remove such orphaned snapshots before
resorting to remove the oldest snapshot.

11 years agoFix some typos.
Andre Noll [Fri, 29 May 2009 20:03:19 +0000 (22:03 +0200)]
Fix some typos.

11 years agoRestart rsync also on exit value 12.
Andre Noll [Fri, 29 May 2009 11:49:13 +0000 (13:49 +0200)]
Restart rsync also on exit value 12.

An exit value of 12 means "Error in rsync protocol data stream",
and it happens regularly for rsync-3 without apparent reason. So
restart the rsync process also in this case.

11 years agoFix return value of remove_oldest_snapshot().
Andre Noll [Tue, 5 May 2009 08:53:43 +0000 (10:53 +0200)]
Fix return value of remove_oldest_snapshot().

We _must_ return non-zero if the remove was initiated. The old code
would exit with

try_to_free_disk_space: uhuhu: not enough disk space for a single snapshot

even though there are plenty of snapshots available that can be deleted.

11 years agoFix rm-hooks in case no post-remove hook was specified.
Andre Noll [Mon, 27 Apr 2009 18:19:11 +0000 (20:19 +0200)]
Fix rm-hooks in case no post-remove hook was specified.

Without the patch the following assertion was triggered upon
removal of the second snapshot:

dss: dss.c:229: pre_remove_hook: Assertion `!snapshot_currently_being_removed' failed.

Thanks to Sebastian Stark who pointed out the issue.

11 years agoImplement rm-hooks.
Andre Noll [Wed, 8 Apr 2009 13:23:01 +0000 (15:23 +0200)]
Implement rm-hooks.

This adds calls for the pre-remove and the post-remove hooks, similar to
the pre-create/post-create hooks. If the pre-remove hook fails, snapshot
deletion is deferred until the hook succeeds.

11 years agoRename hook_status enum.
Andre Noll [Tue, 7 Apr 2009 14:50:32 +0000 (16:50 +0200)]
Rename hook_status enum.

We'd like to use only one set of states for both creation/removal.

11 years agoMerge branch 'master' into rm_hook
Andre Noll [Tue, 7 Apr 2009 14:17:01 +0000 (16:17 +0200)]
Merge branch 'master' into rm_hook

11 years agocom_create: Abort if pre-create hook fails.
Andre Noll [Tue, 7 Apr 2009 14:15:01 +0000 (16:15 +0200)]
com_create: Abort if pre-create hook fails.

handle_pre_create_hook_exit() returns zero if the hook failed.

11 years agoAdd pre-remove and post-remove hooks to dss.ggo.
Andre Noll [Tue, 7 Apr 2009 13:23:34 +0000 (15:23 +0200)]
Add pre-remove and post-remove hooks to dss.ggo.

These are not yet used in the code.

11 years agoRename rm_pid to remove_pid.
Andre Noll [Tue, 7 Apr 2009 13:09:59 +0000 (15:09 +0200)]
Rename rm_pid to remove_pid.

This variable will contain the pid of rm-hooks or the rm process.

11 years agoMerge branch 'master' into rm_hook
Andre Noll [Tue, 7 Apr 2009 12:18:14 +0000 (14:18 +0200)]
Merge branch 'master' into rm_hook

11 years agoMerge commit 'meins/master'
Andre Noll [Mon, 30 Mar 2009 10:50:35 +0000 (12:50 +0200)]
Merge commit 'meins/master'

11 years agoFix the pre-create hook.
Andre Noll [Mon, 30 Mar 2009 10:49:03 +0000 (12:49 +0200)]
Fix the pre-create hook.

Returning non-zero from the pre-create hook caused dss to exit with
"unexpected exit code" rather than waiting until the hook returns

Fix this bug and also reduce the verbostity of the log messages caused
by executing the pre-create hook: It should be enough to tell the user
only once per hour that no more snapshots are going to be created.

11 years agoClarify usage of --rsync-option.
Andre Noll [Sun, 22 Mar 2009 02:42:07 +0000 (03:42 +0100)]
Clarify usage of --rsync-option.

11 years agoMerge commit 'fml/master'
Andre Noll [Mon, 16 Mar 2009 21:05:32 +0000 (22:05 +0100)]
Merge commit 'fml/master'

11 years agoBump version number to 0.1.2.
Andre Noll [Mon, 16 Mar 2009 16:30:01 +0000 (17:30 +0100)]
Bump version number to 0.1.2.

Oops, this should have been done just before tagging the 0.1.2 release..

11 years agoIntroduce the snapshot removal status.
Andre Noll [Thu, 5 Mar 2009 09:38:39 +0000 (10:38 +0100)]
Introduce the snapshot removal status.

It is not yet used, but we need something like that for the remove-hooks.

11 years agoTrivial typo fix.
Andre Noll [Mon, 16 Mar 2009 16:19:28 +0000 (17:19 +0100)]
Trivial typo fix.

11 years agoUse only one global variable for snapshot creation pids.
Andre Noll [Mon, 16 Mar 2009 15:57:56 +0000 (16:57 +0100)]
Use only one global variable for snapshot creation pids.

There's no need to have pre_create_hook_pid, rsync_pid and
post_create_hook_pid because only one of them can be running at
any point in time. We can always tell which it is by examining the

So replace these three variables by the single create_pid variable.

Besides of killing two global variables, this change also fixes a
real bug: If the dss process catches SIGINT or SIGTERM, the old code
would only kill a running rsync process but not the pre-create or
post-create hook. However, the new code kills whatever create process
is currently running, which is the right thing to do.

11 years agoMerge commit 'meins/master'
Andre Noll [Fri, 13 Mar 2009 17:06:04 +0000 (18:06 +0100)]
Merge commit 'meins/master'

11 years agoMerge commit 'fml/master'
Andre Noll [Fri, 13 Mar 2009 08:24:21 +0000 (09:24 +0100)]
Merge commit 'fml/master'

11 years agoInclude the reason why a snapshot gets removed in the log message. v0.1.2
Andre Noll [Thu, 5 Mar 2009 09:16:10 +0000 (10:16 +0100)]
Include the reason why a snapshot gets removed in the log message.

11 years agoNever remove the snapshot that is currently being created.
Andre Noll [Thu, 5 Mar 2009 09:13:12 +0000 (10:13 +0100)]
Never remove the snapshot that is currently being created.

Thanks to Sebastian Stark for pointing out this bug.

11 years agoMerge commit 'fml/master'
Andre Noll [Wed, 11 Feb 2009 22:51:44 +0000 (23:51 +0100)]
Merge commit 'fml/master'

11 years agoMerge commit 'stark/master'
Andre Noll [Mon, 2 Feb 2009 18:23:33 +0000 (19:23 +0100)]
Merge commit 'stark/master'

11 years agoInvalidate all rsync options on SIGHUP.
Andre Noll [Mon, 2 Feb 2009 18:23:20 +0000 (19:23 +0100)]
Invalidate all rsync options on SIGHUP.

gengetopt's params->override option does not do what its name suggests,



11 years agofix post_create_hook: really pass full path to last complete snapshot
Sebastian Stark [Sat, 31 Jan 2009 09:04:28 +0000 (10:04 +0100)]
fix post_create_hook: really pass full path to last complete snapshot

11 years agoMerge commit 'fml/master'
Andre Noll [Tue, 23 Dec 2008 22:14:34 +0000 (23:14 +0100)]
Merge commit 'fml/master'

11 years agoAdd some comments to compute_next_snapshot_time().
Andre Noll [Thu, 11 Dec 2008 13:07:49 +0000 (14:07 +0100)]
Add some comments to compute_next_snapshot_time().

Also, move the call to gettimeofday() down to where it is needed.

11 years agoMerge commit 'sio/master'
Andre Noll [Mon, 8 Dec 2008 16:21:51 +0000 (17:21 +0100)]
Merge commit 'sio/master'

11 years agoFix check when to use rsync locally.
Andre Noll [Mon, 8 Dec 2008 16:17:50 +0000 (17:17 +0100)]
Fix check when to use rsync locally.

We can do this if (a) remote_host_arg is "localhost" and (b)
remote_user_arg is the same as logname. The old code only
looked at the logname and thus tried to use rsync locally even
if a remote_host_arg was specified.

11 years agoFix a typo in README.
Andre Noll [Mon, 1 Dec 2008 17:38:49 +0000 (18:38 +0100)]
Fix a typo in README.

11 years agoINSTALL: Mention "make man".
Andre Noll [Sat, 22 Nov 2008 22:41:59 +0000 (23:41 +0100)]
INSTALL: Mention "make man".

11 years agoClarify the --keep-redundant option.
Andre Noll [Sun, 16 Nov 2008 12:19:32 +0000 (13:19 +0100)]
Clarify the --keep-redundant option.

dss cares about the number of free inodes, not the inode ratio.

11 years agodss-0.1.1. v0.1.1
Andre Noll [Wed, 12 Nov 2008 16:52:20 +0000 (17:52 +0100)]

11 years agoPrevent busy loops on rsync exit code 13.
Andre Noll [Thu, 6 Nov 2008 09:32:01 +0000 (10:32 +0100)]
Prevent busy loops on rsync exit code 13.

We restart the rsync process in case it returned with exit code 13
which unfortunately happens for some unknown reasons even with a
valid configuration.

This may lead to a busy loop, so wait at least one minute before
restarting rsync.

11 years agoIgnore any snapshot directory with creation time > completion time.
Andre Noll [Thu, 6 Nov 2008 08:52:28 +0000 (09:52 +0100)]
Ignore any snapshot directory with creation time > completion time.

Without this fix, dss would abort du to an assertion in dss.c:

dss.c:171: compute_next_snapshot_time: Assertion `x >= 0' failed.

Thanks to Sebastian Stark for pointing out this flaw.

11 years agouse C99-compliant format strings for consistency reasons
Sebastian Stark [Wed, 22 Oct 2008 15:14:30 +0000 (17:14 +0200)]
use C99-compliant format strings for consistency reasons

11 years agoopen /dev/null for reading AND writing when executing rsync.
Sebastian Stark [Wed, 22 Oct 2008 12:59:11 +0000 (14:59 +0200)]
open /dev/null for reading AND writing when executing 

This is needed for child processes to be able to write to fd 2 without failing.

For example, rsync will not be able to write an error message because of "Bad
file descriptor" which in turn leads to rsync exiting with meaningless exit
code 13 ("Errors with program diagnostics"), masking the actual error and exit

The fact that rsync uses exit code 13 in that case makes this bug particularly
painful since 13 is interpreted by dss as a temporary rsync error that can be
"fixed" by simply restarting rsync. This can lead to an infinite loop,

11 years agoshow human readable snapshot creation duration when listing snapshots.
Sebastian Stark [Wed, 22 Oct 2008 11:31:42 +0000 (13:31 +0200)]
show human readable snapshot creation duration when listing snapshots.

The PRId64 macro is defined in the C99 standard. See


12 years agoAdd dss.1 and dss.1.html to .gitignore.
Andre Noll [Mon, 7 Jul 2008 14:29:56 +0000 (16:29 +0200)]
Add dss.1 and dss.1.html to .gitignore.

12 years agoRestart the rsync process if it returned with exit code 13.
Andre Noll [Mon, 7 Jul 2008 14:29:38 +0000 (16:29 +0200)]
Restart the rsync process if it returned with exit code 13.

Unfortunately this happens frequently for no apparent reason.

12 years agoFix the exit hook.
Andre Noll [Wed, 21 May 2008 14:36:13 +0000 (16:36 +0200)]
Fix the exit hook.

As dss_exec_cmdline_pid() uses the space character as a separator
to split the command line, the words of the error message were
passed as separate parameters to the exit hook.

Use dss_exec() directly to avoid this flaw, i.e. to pass the full
error message as $1 to the exit hook.

12 years agoOffer a direct link to the automatically generated tarball.
Andre Noll [Fri, 16 May 2008 09:27:48 +0000 (11:27 +0200)]
Offer a direct link to the automatically generated tarball.

As suggested by Sebastian Stark.

12 years agoNAME section for manpage
Sebastian Stark [Wed, 14 May 2008 14:08:25 +0000 (16:08 +0200)]
NAME section for manpage

12 years agoadd SEE ALSO section to manpage
Sebastian Stark [Wed, 14 May 2008 14:03:31 +0000 (16:03 +0200)]
add SEE ALSO section to manpage

12 years agodss-0.1.0. v0.1.0
Andre Noll [Wed, 14 May 2008 13:16:08 +0000 (15:16 +0200)]

12 years agosnap.c: Add missing include to make it compile on FreeBSD.
Andre Noll [Wed, 14 May 2008 12:22:40 +0000 (14:22 +0200)]
snap.c: Add missing include to make it compile on FreeBSD.

12 years agoNetBSD Compile fixes.
Andre Noll [Wed, 14 May 2008 12:09:41 +0000 (14:09 +0200)]
NetBSD Compile fixes.

Add a missing include and the dss_isdigit macro.

12 years agoFix paths and URLs, improve INSTALL text.
Andre Noll [Tue, 13 May 2008 14:47:29 +0000 (16:47 +0200)]
Fix paths and URLs, improve INSTALL text.

12 years agoINSTALL: Fix a typo.
Andre Noll [Mon, 12 May 2008 22:32:51 +0000 (00:32 +0200)]
INSTALL: Fix a typo.

12 years agoREADME, INSTALL improvements.
Andre Noll [Mon, 12 May 2008 21:21:45 +0000 (23:21 +0200)]
README, INSTALL improvements.

Improve basic example usage and mention that dss provides an additional
level of data security.

12 years agoImplement exit-hooks.
Andre Noll [Mon, 12 May 2008 18:29:34 +0000 (20:29 +0200)]
Implement exit-hooks.

12 years agoClarify documentation of --run.
Andre Noll [Mon, 12 May 2008 18:28:58 +0000 (20:28 +0200)]
Clarify documentation of --run.

12 years agoAdd new option --keep-redundant.
Andre Noll [Mon, 12 May 2008 15:42:35 +0000 (17:42 +0200)]
Add new option --keep-redundant.

12 years agoFix the math in the description of the unit interval.
Andre Noll [Mon, 12 May 2008 15:42:14 +0000 (17:42 +0200)]
Fix the math in the description of the unit interval.

12 years agoClarify the difference between outdated and redundant snapshots.
Andre Noll [Mon, 12 May 2008 15:41:15 +0000 (17:41 +0200)]
Clarify the difference between outdated and redundant snapshots.

12 years agoAdd section "Commands" to dss help text.
Andre Noll [Mon, 12 May 2008 14:41:35 +0000 (16:41 +0200)]
Add section "Commands" to dss help text.

12 years agoindex.html.in: Remove Link to top of the page.
Andre Noll [Mon, 12 May 2008 14:41:13 +0000 (16:41 +0200)]
index.html.in: Remove Link to top of the page.

12 years agoAdd web page stuff.
Andre Noll [Mon, 12 May 2008 13:22:12 +0000 (15:22 +0200)]
Add web page stuff.

12 years agoAdd INSTALL -- installation and usage notes.
Andre Noll [Mon, 12 May 2008 13:19:27 +0000 (15:19 +0200)]
Add INSTALL -- installation and usage notes.

12 years agodss.c: Remove obsolete TODO item.
Andre Noll [Mon, 12 May 2008 12:35:35 +0000 (14:35 +0200)]
dss.c: Remove obsolete TODO item.

12 years agoMinor help text improvements/fixes.
Andre Noll [Mon, 12 May 2008 12:35:19 +0000 (14:35 +0200)]
Minor help text improvements/fixes.

12 years agoAdd GPL headers and COPYING file.
Andre Noll [Mon, 12 May 2008 08:56:35 +0000 (10:56 +0200)]
Add GPL headers and COPYING file.

12 years agodss-0.0.5. v0.0.5
Andre Noll [Thu, 24 Apr 2008 16:01:19 +0000 (18:01 +0200)]

12 years agoFix return value of try_to_free_disk_space().
Andre Noll [Thu, 24 Apr 2008 15:39:53 +0000 (17:39 +0200)]
Fix return value of try_to_free_disk_space().

We must never, ever return a system error without converting
it to a dss error code first.

12 years agoLoglevel adjustments.
Andre Noll [Thu, 24 Apr 2008 15:38:29 +0000 (17:38 +0200)]
Loglevel adjustments.

12 years agoFix select timeout.
root [Thu, 17 Apr 2008 15:58:20 +0000 (17:58 +0200)]
Fix select timeout.

Under Linux, select() modifies the timeval pointed to by the last
parameter; it contains the time that was not slept because an fd
in one of the given fd sets became ready.

It is hence necessary to reset the time to be slept in each iteration
off dss' select loop.

12 years agoMerge commit 'fml/master'
root [Mon, 14 Apr 2008 16:33:39 +0000 (18:33 +0200)]
Merge commit 'fml/master'

12 years agodss.c: Sleep at most 60 seconds.
Andre Noll [Mon, 14 Apr 2008 16:30:50 +0000 (18:30 +0200)]
dss.c: Sleep at most 60 seconds.

Otherwise we might miss to remove snapshots in time.

12 years agoMerge commit 'remotes/fml/master'
root [Mon, 31 Mar 2008 11:07:45 +0000 (13:07 +0200)]
Merge commit 'remotes/fml/master'

12 years agoKill --exclude-patterns option.
Andre Noll [Mon, 31 Mar 2008 11:05:52 +0000 (13:05 +0200)]
Kill --exclude-patterns option.

The same can be achieved by using the --rsync-option.

12 years agoMerge commit 'remotes/fml/master'
root [Fri, 28 Mar 2008 14:10:20 +0000 (15:10 +0100)]
Merge commit 'remotes/fml/master'

12 years agoFix a serious bug in deamon mode.
Andre Noll [Fri, 28 Mar 2008 14:01:09 +0000 (15:01 +0100)]
Fix a serious bug in deamon mode.

In daemon mode, we changed to dest_dir _before_ calling daemon_init(),
which changes the cwd to /.

Fix this rather embarrassing bug by changing cwd later. To this aim,
introduce change_to_dest_dir() which also logs some messages.

12 years agodss.ggo: Disable inode monitoring by default.
Andre Noll [Thu, 27 Mar 2008 16:59:22 +0000 (17:59 +0100)]
dss.ggo: Disable inode monitoring by default.

Not all file systems support inodes. For example reiserfs reports zero
for all inode-related fields in the statvfs structure. Even worse, on
windows file systems, the field contains some more or less arbitrary
large number.

12 years agoRemove some useless stuff from gcc-compat.h
root [Thu, 27 Mar 2008 10:22:36 +0000 (11:22 +0100)]
Remove some useless stuff from gcc-compat.h

12 years agoPrint config errors.
Andre Noll [Thu, 27 Mar 2008 10:15:15 +0000 (11:15 +0100)]
Print config errors.

Dooh. This broke in 9c4bc98761828cbe3997e071ad5b4d24eb52e599.

12 years agodss-0.0.4. v0.0.4
Andre Noll [Sat, 22 Mar 2008 20:55:48 +0000 (21:55 +0100)]

12 years agoAlso check for free inodes and start snapshot removal if necessary.
Andre Noll [Sat, 22 Mar 2008 20:54:59 +0000 (21:54 +0100)]
Also check for free inodes and start snapshot removal if necessary.