The files i'm backing up are subversion, management docs and custom documents from ubuntu machine. As far as complexity is concerned, its not huge files which are backed up!! So good to hear from you people about rsync, i'll check it out!!
I just started out with python, I'm having an issue, how do i tell in my script which external USB drive is now plugged in??
I want my script to tell which USB drive i'm plugged in.........please help.
Code:
d = datetime.datetime.now()
dateVar = d.strftime('%Y%m%d_%H%M')
print dateVar
#not good idea to use os.system(...)
#os.mkdir(dateVar)
#subprocess.call(['mkdir', '/home/abhilash/ %s' %dateVar])
# Copy recursively from child of the folder, make sure the destination directory should not exist!!
shutil.copytree('/home/abhilash/Documents', '/media/PENDRIVE/backup/ %s' %dateVar)
I'm roughly doing in the start, will add more features as it progress, i'm total newbie to python, so don't freak me out!!
Bookmarks