]> git.sthu.org Git - sitarba.git/commitdiff
Add missing sitarba file v2.0-rc2
authorStefan Huber <shuber2@gmx.at>
Tue, 22 May 2012 07:27:19 +0000 (09:27 +0200)
committerStefan Huber <shuber2@gmx.at>
Tue, 22 May 2012 07:27:19 +0000 (09:27 +0200)
- Renamed shbackup to sitarba
- Call tar with --verbose if sitarba is verbose

sitarba

diff --git a/sitarba b/sitarba
index e57e2508500fe22a966357413cb6d398c73a9f20..c236ba0589e68018b41991ba3231ef40b6396ed3 100755 (executable)
--- a/sitarba
+++ b/sitarba
@@ -393,6 +393,10 @@ class BackupManager:
         fsfn = os.path.join(targetdir, fileset.name) + "." + self.conf.format
         taropts = []
 
+        # Tar is verbose is sitarba is verbose
+        if LogConf.con.level <= logging.INFO:
+            taropts += ["--verbose"]
+
         # Add the since date, if given
         if since != None:
             taropts += ["-N", since.strftime("%Y-%m-%d %H:%M:%S")]
@@ -405,11 +409,12 @@ class BackupManager:
         for pat in fileset.excludes:
             taropts += ["--exclude", pat]
 
+
         # Adding directories to backup
         taropts += ["-C", "/"] + [ "./" + d.lstrip("/") for d in fileset.dirs]
 
         # Launch the tar process
-        tarargs = [self.conf.tarbin] + ["-cpvaf", fsfn] + taropts
+        tarargs = [self.conf.tarbin] + ["-cpaf", fsfn] + taropts
         logfile.debug("tar call: " + " ".join(tarargs))
         tarp = subprocess.Popen( tarargs, bufsize=-1, \
                 stdout=subprocess.PIPE, stderr=subprocess.PIPE )
@@ -583,7 +588,7 @@ class BackupManager:
 def printUsage():
     """Print --help text"""
 
-    print("shbackup - a simple backup solution.")
+    print("sitarba - a simple backup solution.")
     print("")
     print("Usage:")
     print("  " + sys.argv[0] + " {options} [cmd]")
@@ -597,7 +602,7 @@ def printUsage():
     print("Options:")
     print("  -h, --help                 print this usage text")
     print("  -c, --conf FILE            use given configuration file")
-    print("                             default: /etc/shbackup.conf")
+    print("                             default: /etc/sitarba.conf")
     print("  -e, --epoch EPOCH          force to create backup for given epoch, which")
     print("                             can be 'sporadic' or one of the configured epochs")
     print("  -m, --mode MODE            override mode: full, diff, or incr")
@@ -630,7 +635,7 @@ if __name__ == "__main__":
 
     LogConf.setup()
 
-    conffn = "/etc/shbackup.conf"
+    conffn = "/etc/sitarba.conf"
     cmd = "list"
     mode = None
     epoch = None
@@ -649,7 +654,7 @@ if __name__ == "__main__":
             conffn = sys.argv[i]
 
         elif opt in ["-V", "--version"]:
-            print("shbackup " + __version__)
+            print("sitarba " + __version__)
             exit(0)
 
         elif opt in ["-v", "--verbose"]: