Jump to content

Folder changes to backup


Recommended Posts

Hi, we have just rebuilt our server and have changed the folder location of our email store. How do I exclude the old folder and include the new one in the backup? I'm confused between snapshots, catalogs and sets and concerned that changes could affect future backups because the catalogs/snapshots (?) don't match therefore making a future retrieval impossible. Can anyone advise? thanks.

Link to comment
Share on other sites

Quote:

I'm confused between snapshots, catalogs and sets...

 


A backup set is where your backup data is stored. There are various types of backup sets, depending on the media you wish to use: tape, CD/DVD, file, etc.

 

A catalog is a listing of all the files included in a particular backup set.

 

A snapshot is a listing of the files that were on a particular source volume at the time of a given backup. It's the most powerful tool for restoring the volume to the state it was as of that backup. By default, Retrospect remembers only the most recent snapshot, but you can easily retrieve a prior snapshot, if necessary.

 

Quote:

... and concerned that changes could affect future backups because the catalogs/snapshots (?) don't match therefore making a future retrieval impossible.

 


 

It's not perfectly clear what you mean here. However, in general, Retrospect keeps track of files using many attributes, including name, size, creation and modification times, etc., so unless these all match exactly, it can't confuse one file with another. If there's the possibility that the above attributes may match, you can further select in your backup script the option of matching by location (volume/folder) as well.

 

Quote:

How do I exclude the old folder and include the new one in the backup?

 


You may not even need to do this. However, if you want to exclude any folder, you can do so via the selection criteria you choose in your backup script. (If you're going to use the same selection criteria in multiple scripts, consider writing a custom selector instead.)

 

Quote:

Hi, we have just rebuilt our server and have changed the folder location of our email store.

 


Another consideration is that, depending on the email software you're using, there may be problems in achieving a usable backup of the database if the application is running at the time of backup. See the recent thread Opening and using an application.. for potential concerns.

Link to comment
Share on other sites

twickland,

 

What a great, concise explanation of backup sets, catalogs, snapshots.

 

As for email servers, I can confirm that a Retrospect backup of the Cyrus email database on Mac OS 10.4.x will be corrupt upon restore unless the mail service is shut down while backing up the mail store. Cyrus has a number of files and folders that must be self-consistent, and the mail system needs to be quiescent during the backup. A problem with shutting down your email server and restarting it after Retrospect backup finishes is that would have your email server down for a long time.

 

One way to do it "right" on Mac OS X server is to have a "trigger script" in the Retrospect Event Handler that calls the excellent mailbfr Cyrus email database backup script (written by Athanasios Alexandrides ("Alex")) before backup of the server's volume with the email store. The mailbfr script will surround its email store backup (similar to a Retrospect "duplicate") with start/stop of the email server, then the trigger script could hand off the heavy lifting of backup to a Retrospect script that excludes the Cyrus email database from backup by an appropriate selector. Retrospect will then back up the copy of the email database that was preserved by mailbfr, along with the rest of the server volume(s).

 

The mailbfr script is available here:

mailbfr script

 

Russ

Link to comment
Share on other sites

Hi, thanks for this. On the point concerning excluding the old and including the new folder, I still don't understand where exactly I do this. Do I go into Automate/Scripts and edit the 'full filestore' or do I change this in Configure/Backup Sets? I'm trying to find the correct way to do it to change the backup throughout all of the daily backups without having to edit individually. Finally, thanks for the tip on the email store. We are just backing up the backup not the live store.

Link to comment
Share on other sites

Quote:

A backup set is where your backup data is stored.

 


 

Actually, I have to take issue with this wording.

 

A Backup Set is the combination of the "Catalog" (which lists the files that have been copied) and the "Media" (where the files are actually stored).

 

And to be slightly more granular, some Backup Sets can have multiple Media "Members."

Link to comment
Share on other sites

Quote:

On the point concerning excluding the old and including the new folder, I still don't understand where exactly I do this. Do I go into Automate/Scripts and edit the 'full filestore' or do I change this in Configure/Backup Sets? I'm trying to find the correct way to do it to change the backup throughout all of the daily backups without having to edit individually. Finally, thanks for the tip on the email store. We are just backing up the backup not the live store.

 


It's all done with Selectors, a topic that is a bit more than can be explained in the forums. See chapter 9 of the Retrospect Users Guide, beginning on page 177 ("Using Selectors"). You would just exclude those folders that mailbfr will back up, and make sure that the mailbfr target folder (whereever you set it up) is included in the folders that will be backed up for your server by Retrospect. Usually, unless you have done something odd, you don't need to do anything special to get a folder included. Then, once you have the selector properly defined, specify that selector's name in the "Selecting" button for the script.

 

My suggestion is to start with one of the selectors that comes with Retrospect (perhaps "All Files Except Cache Files"), duplicate it (Selectors menu, Duplicate), modify the copy to exclude Spotlight ("enclosing folder name does include .Spotlight-V100"), add other cache files (Firefox, etc.), then add exclusions on the folders backed up by mailbfr (will vary depending on where you have your mail store). I would suggest (a) don't target mailbfr's output to the same volume as your mail store, in case that volume goes south, and (B) give mailbfr a target destination without spaces in the name (or else you will have to be "real careful" when entering the name to mailbfr). One easy way to do this is to put a symbolic link at the server's root directory, linking to the "real" mailbfr target folder (whose name may have spaces in its path). E.g., create a symbolic link /mailbfrBackups that points to your mailbfr target folder for the backups, where the target folder may have spaces in its path, etc.

 

Note that mailbfr needs to be run as root, so, either your Apple Event Handler call of mailbfr needs to be invoked as something like (see the documentation for arguments you might want for mailbfr):

Code:


try

do shell script "/usr/bin/sudo /usr/sbin/mailbfr -b /mailbfrBackups --mode incremental" password "rootpasswordhere" with administrator privileges

end try


or you would have to make mailbfr setuid root (be very careful here, make sure it's not writable then because otherwise you would have a big security hole). And making mailbfr non-writable could give update problems when mailbfr tries to update itself.

 

Obviously, because your root password will now be in this file if you use the sudo route rather than making mailbfr setuid root, you should not make the Retrospect Event Handler readable by anyone except a select group of users, if any.

 

Selectors are hard to get right on your first (or second, or third) try. Best way is to test by setting up an Immediate backup using that selector, but don't actually do the backup - just look at the list of files in the Preview that will be backed up.

 

Quote:

I'm trying to find the correct way to do it to change the backup throughout all of the daily backups without having to edit individually.

 


Well, to do this you need to set up the selector, then specify that selector in all of your backup scripts that you want to use the chosen criteria. But you will have to set up all of the backup scripts to use the proper selector.

 

Hope this helps,

 

Russ

Link to comment
Share on other sites

Hi, thanks for all the advice but I think I'm getting out of my depth for what I need to do. I may not have explained myself clearly enough.

 

I have a folder called KerioBackup which contains a zip file of previously backed up data belonging to that application. I would like to include this in our daily backup but it exists out of the usual catchment area. I therefore would like to add that folder (presumably to the catalog so it becomes part of the daily snapshot).

 

I looked at selectors but I thought there must be an easier way of adding a folder to the backup than creating selectors for all the current folders in order to add the new one. Thanks.

Link to comment
Share on other sites

Quote:

I have a folder called KerioBackup which contains a zip file of previously backed up data belonging to that application. I would like to include this in our daily backup but it exists out of the usual catchment area. I therefore would like to add that folder (presumably to the catalog so it becomes part of the daily snapshot).

 

I looked at selectors but I thought there must be an easier way of adding a folder to the backup than creating selectors for all the current folders in order to add the new one.

 


Although you don't say so, it sounds like you inherited a setup that someone else created. It also seems like you haven't spent much time with the Retrospect manual (admittedly not an easy read, but I recommend you try looking at it).

 

By default, a Retrospect script will back up all folders and files on your chosen source volume, which will be an entire volume as mounted in Finder. Thus, if (as it seems) you are not currently backing up everything, you (or your predecessor) must either a) have specified certain selection criteria in the script itself; B) be using a custom selector or a standard selector other than "All Files;" or c) have defined certain folders on your disk volume as subvolumes and be using those subvolumes as source volumes for your backup.

 

"Catchment area" is not a Retrospect term, so I assume this must be some folder that you're currently backing up. If you're currently using a selector (or have written the selection criteria directlty in the script) it is a simple matter to add the OR criterion "Enclosing folder is KerioBackup" to the Include section. If you're using subvolumes, you should define the folder KerioBackup as a subvolume (in Configure> Volumes) and add it to the list of source volumes in your backup script.

 

If what I've said doesn't make sense to you, please take a look at the manual and then come back with a description of exactly how your backup script is written.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...