Python backup part 3

    The third version of the backup script on python :) This time, an archive with files for backup is not created. Instead, files from one place (source folders) are moved to another place (folders with backups) as they are. For real work, when only a couple of dozen files can be exchanged per day, this is much more profitable. DropBox will only download these few files, instead of a huge archive.

    Actually, it seems to me that something like this should already exist, especially for Linux :) On the other hand, the backup was not written because it doesn’t exist yet, but in order to know the python better.

    Now the algorithm is like that. We take the source folder (“left”), create a folder in the output folder (“right”), copy only changed folders / files from left to right, delete folders / files deleted from the left and right. In this case, a folder will be created on the right that displays the full path to the folder on the left.

    For example, the source folder d:\projects\python, destination folder - d:\dropbox\backup, then the real destination folder will be like this - d:\dropbox\backup\d_\projects\python.

    Everything else remains from previous versions - the list files toBackup.lst, ignore.lst, extra.lst.

    The script is here:

    Free Image Hosting at

    Also popular now: