Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple backup source folders of the same name on different disks #47

Open
phil-davis opened this issue Jul 17, 2015 · 0 comments

Comments

@phil-davis
Copy link
Member

If the user has:
D:\Photos
E:\Photos
and wants to backup both of them, then the output folder in the backup destination is named based on "Photos" and becomes very confusing. Also when doing the Delorian diff against previous backup, E:\Photos backup will see the backup of D:\Photos that has just been done. All files will be different and thus it will be effectively a full backup. Then next time the backup is run, D:\Photos backup will see the previous backup of E:\Photos and see that everything looks different and thus effectively do a full backup. This misses the whole point of hard-links and saving space!
The problem also happens if the user is backing up stuff like:
D:\Family\Photos
D:\Work\Photos

Solution might be:

  1. Add a boolean parameter useFullPathForBackupFolderName - if that is set (true) then generate a folder name in the backup destination using all the components of the path. e.g.
    D-Photos
    E-Photos
    D-Family-Photos
    D-Work-Photos

The user might have a folder:
D:\D-Photos
and want to back that up!
It would make the name:
D-D-Photos
which is OK.

But if they have:
D:\Family\Photos
D:\Family-Photos
then both would become:
D-Family-Photos

Hmmm - how to generate a folder name from a path in a way that will always come out unique. Whatever we do, the part of the folder name after the disk bit ("D-" or whatever) will itself be a valid folder name, and so the user can also have a backup source folder of that name on "D" drive.

  1. If useFullPathForBackupFolderName is not set, then check all the backup source bottom-level folder names for duplicates. If any duplicates are found then automatically switch to useFullPathForBackupFolderName
    A side-effect of this will be when a user adds extra backup sources that now have duplicates. The previous "Photos" backup folders will no longer be "seen" and each "Photos" source folder will get a new full backup the first time. The previous "Photos" backups will be left dangling and never be automatically cleaned up.
    Similar effect if the user removed duplicate folders and start running a simpler set of backup sources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant