]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Add new option --keep-redundant.
authorAndre Noll <maan@systemlinux.org>
Mon, 12 May 2008 15:42:35 +0000 (17:42 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 12 May 2008 15:42:35 +0000 (17:42 +0200)
dss.c
dss.ggo

diff --git a/dss.c b/dss.c
index cd69c27d85a5066a49c00817621db6371c01d31e..49be34839204d3ac4113ee97c7bc87cb72e904e5 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -329,6 +329,8 @@ static int try_to_free_disk_space(int low_disk_space)
        int ret;
        struct snapshot_list sl;
 
        int ret;
        struct snapshot_list sl;
 
+       if (!low_disk_space && conf.keep_redundant_given)
+               return 0;
        dss_get_snapshot_list(&sl);
        ret = remove_outdated_snapshot(&sl);
        if (ret) /* error, or we are removing something */
        dss_get_snapshot_list(&sl);
        ret = remove_outdated_snapshot(&sl);
        if (ret) /* error, or we are removing something */
diff --git a/dss.ggo b/dss.ggo
index 7892d530c3a689a1edb665e84d6f9472f387884c..8037373321acbde3327966e9fe997a749b5c01f8 100644 (file)
--- a/dss.ggo
+++ b/dss.ggo
@@ -323,3 +323,17 @@ details="
 
        A value of zero (the default) deactivates this check.
 "
 
        A value of zero (the default) deactivates this check.
 "
+
+option "keep-redundant" k
+#~~~~~~~~~~~~~~~~~~~~~~~~
+"Prune by disk space only"
+flag off
+details="
+       If this flag is not given dss removes redundant and outdated
+       snapshots automatically.
+
+       Otherwise, this feature is deactivated so that snapshots
+       are only being removed in case disk space or inode ratio
+       becomes low. Use this flag if the file system containing the
+       destination directory is used for snapshots only.
+"