while True:
user_input = raw_input('Command (m for help):').strip()
if user_input == 'm':
print '''Warning: The following command will remove mysql datafile, should be used with caution.
rrestore to recent backup
sshow backup list
nchoose backup restore from new
lchoose backup restore from last
qquit
''',
elif user_input == 'r':
restore()
elif user_input == 'q':
exit()
elif user_input == 's':
print 'New:'
os.system('ls %s' % bakdir_new)
print 'Last'
os.system('ls %s' % bakdir_new)
elif user_input == 'n':
os.system('ls -l %s' % bakdir_new)
while True:
user_input = raw_input('Please enter line number restore:').strip()
if user_input == 'q':
exit()
try:
line_number = int(user_input)
dir_count = len(dirlist_new)
if line_number