while True:
backupfile = os.path.join(config['dirs']['backups'], backupname + "." + str(i))
if not os.path.exists(backupfile):
while True:
backupfile = os.path.join(config['dirs']['backups'], backupname + "." + str(i))
if not os.path.exists(backupfile):