This is a simple commandline app that will ask a user what to back up and back it up. Download the source here.
#!/usr/bin/env python import os import commands import datetime def cls(): # Define the clear windows command clear = commands.getoutput('clear') print clear cls() # Print introduction print "This program will make a backup of a list of files in file_list.txt file." print print "Do you want to continue? ", con = raw_input("[y/n]: ") if con == "y": print "Lets get started then" cls() print "Where do you want the backup file to be writtten?" path_name = raw_input("Path to Write to: ") cls() print "What would you like to name the backup file?" bk_name = raw_input("Backup Name: ") cls() print "What is the name of the file or directory you would like to backup?" ob_name = raw_input("Backup Data: ") cls() print "Do you want to compress the file? ", compress = raw_input("[y/n]: ") bk_cmd = "tar cvf " bkz_cmd = "tar cvfz " if compress == "n": run_bk = bk_cmd + path_name + "/" + bk_name + ".tar" + " " + ob_name if compress == "y": run_bk = bkz_cmd + path_name + "/" + bk_name + ".tar.gz" + " " + ob_name cls() print "Checking to see if the directory exists." file_check = os.path.isfile(ob_name) dir_check = os.path.exists(ob_name) if file_check == 1: #output = commands.getoutput(run_bk) #print output os.system(run_bk) cls() elif dir_check == 1: #output = commands.getoutput(run_bk) #print output os.system(run_bk) cls() elif file_check == 0 and dir_check == 0: cls() print "ERROR: The object does not exsist!" print print else: cls() print "Goodbye" print