> Recently, due to a RAID failure, we had cause to restore a backup onto a > clean installed server. > > As part of our backup policy we don't backup users music, specifically their > iTunes music folders. > We also run mobile home folders for all the staff laptops so in theory their > iTunes libraries etc should just sync back up to the server next time they > sync. > > The problem has arose with the way that LBackup handles excluding folders. > Instead of just excluding the whole folder, LBackup just excluded the folders > content creating an empty folder at the backup destination. Since the restore > of the server we have had iTunes library's disappear when users go to sync. > My expectation is that this is caused due to the blank iTunes folder restored > from the backup being newer then that of the one on the local computer, thus > overwriting the one of the local machine with the one from the server (the > blank one).
I hope that all the iTunes files will be able to be restored easily enough from a which was made prior to the synchronization with the server. Prior to the synchronization of any further client systems with your server, I would recommend a double check that backup of any important files on these clients is up to date, just incase any other files are erased on the clients during the synchronization process. > Is there any way we can change the behaviour of LBackup so that it simply > doesn't backup excluded folders at all, avoiding the empty folders? The short answer is yes it is possible to exclude a directory entirely and not just the contents of a directory. A more detailed answer on how to do this follows. If the path to the directory you wish to exclude (from the root of the backup source) is 'the/folder/to/exclude' and you do not wish to have the 'exclude' directory present within the backup, then adding a line such as the following into your excludes file will mean that the folder called 'exclude' will not be present within the backup : > the/folder/to/exclude If you use rsync to perform a restore then it is also possible to set rsync to exclude these files during the restore process using an excludes file. As an example, if you were backing up the /Users directory on a Mac OS X system and assuming the 'iTunes' directory is in the default location '~/Music/iTunes', then it should be possible to exclude this directory for all users with an excludes line such as one of the following : > */Music/iTunes or > */Music/iTunes/ or > Music/iTunes or > Music/iTunes/ This is not an exhaustive list of ways to approach the exclusion of the iTunes directory. There are most defiantly other approaches. Please keep in mind that the examples above are wild card exclusion and as such it would also exclude a folder with the path '~/Documents/Music/iTunes'. As such, it is highly important that you exercises extreme caution when using wild card exclusions. In order to be more specific you could set the excludes to the root of the backup source directory with an exclude pattern such as the one quoted below. Because it is not a wild card or wild match a directory such as '/Users/bill/Documents/Music/iTunes/' would still be backed up : > /Users/*/Music/iTunes/ With regards to the rsync excludes-from file syntax, a good place to start syntax is the following link : http://programmersnotebook.wordpress.com/2010/03/20/rsync-and-exclude-from/ I trust everything else is working out okay with your restore. One other approach is to add a step to your restore process which involves the removal of these empty iTunes directories which have been restored. To do this the 'rmdir' command is one approach. There is an example quoted below which assumes that the directories are within '/Users/username/Music/iTunes' on the system : > rmdir /Users/*/Music/iTunes Note, it is always important to be carful when using any removal command on *NIX. I do not understand the details with regards the OSX clients syncing with the server under your current setup. As such, I am not sure why these the empty folder has been pulled down from the server. Hopefully, these files are backed up somehow or they are not that important. As you mentioned it could be an issue relating to the time stamps on the directories. Further testing or an email to the Mac OS X Server Admin mailing list may assist you with clarifying what is happening and possibly provide a way to ensure the iTunes files are only synchronized from the client to the server. For example, there may be an option within the Work Group Manager to ensure the sync only happens in one direction (client => server)? In summary the (rsync) excludes file offers great flexibility in regards what will and what will not be backed up. However, it is important to understand the consequences of using wild card exclusions. If you would like to backup the iTunes folders on these clients and are after high ratio data de-duplication within your backup sets, there are a number of commercial products, which may be worth considering. I hope this clarifies the situation and you will be able to configure lbackup to exclude any directories you wish. If you have any problems with the syntax then please report back. If I am not able to help then someone else may be of assistance. Also, there a number of rsync experts who regularly reply to exclude questions on the rsync mailing list. Finally, the following page may be helpful in regards to the restore of data : http://www.lbackup.org/restoring_files_from_backup _______________________________________________ lbackup-discussion mailing list http://www.lbackup.org Change options or unsubscribe : http://lbackup.org/mailing_lists