The third version of the python backup script :) This time the archive with the files for the backup is not created. Instead, files from one location (source folders) are moved to another location (folders with backups) as they are. For real work, when only a couple dozen files can be exchanged per day, it is much more profitable. DropBox will only load 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 written not because there is no such thing yet, but that it would be better to recognize the python.
Now the algorithm is as follows. 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 on the left and right. A folder will be created on the right, displaying the full path to the folder on the left.
')
For example, the source folder is
d:\projects\python
, the destination folder is
d:\dropbox\backup
, then the real destination folder will be
d:\dropbox\backup\d_\projects\python
.
Everything else remains from previous versions - toBackup.lst, ignore.lst, extra.lst list files.
Script here:
pastebin.ca/1590195Screenshot:
