Wednesday, November 16, 2011

Time machine default exclusions list

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- paths we do not want to include in a system backup -->
<key>PathsExcluded</key>
<array>
<string>/.DocumentRevisions-V100</string> <!-- rdar://9083263 -->
<string>/.MobileBackups</string>
<string>/MobileBackups.trash</string>
<string>/.MobileBackups.trash</string>
<string>/.Spotlight-V100</string>
<string>/.TemporaryItems</string>
<string>/.Trashes</string>
<string>/.fseventsd</string>
<string>/.hotfiles.btree</string>
<string>/Backups.backupdb</string>
<string>/Desktop DB</string>
<string>/Desktop DF</string>
<string>/Network/Servers</string>
<string>/Library/Updates</string> <!-- rdar://8580961 -->
<string>/Previous Systems</string>
<string>/Users/Shared/SC Info</string>
<string>/Users/Guest</string>
<string>/dev</string>
<string>/home</string>
<string>/net</string>
<string>/private/var/db/efw_cache</string>
<string>/private/var/db/Spotlight</string> <!-- old tiger location of the Spotlight db -->
<string>/private/var/db/Spotlight-V100</string> <!-- old tiger location of the Spotlight db -->
<string>/private/var/lib/postfix/greylist.db</string> <!-- rdar://8208876 -->
</array>
<!-- paths where we need to capture top level folder to restore disk structure, but don't want to backup any contents -->
<key>ContentsExcluded</key>
<array>
<string>/Volumes</string>
<string>/Network</string>
<string>/automount</string>
<string>/.vol</string>
<string>/tmp</string>
<string>/cores</string>
<string>/private/tmp</string>
<string>/private/Network</string>
<string>/private/tftpboot</string>
<string>/private/var/automount</string>
<string>/private/var/folders</string>
<string>/private/var/run</string>
<string>/private/var/tmp</string>
<string>/private/var/vm</string>
<string>/private/var/db/dhcpclient</string>
<string>/private/var/db/fseventsd</string>
<string>/Library/Caches</string>
<string>/Library/Logs</string>
<string>/System/Library/Caches</string>
<string>/System/Library/Extensions/Caches</string>
</array>
<!-- paths where we need to capture entire subtree folder layout to restore disk structure, but don't want to backup contained files -->
<key>FileContentsExcluded</key>
<array>
<string>/private/var/log</string>
<string>/private/var/spool/cups</string>
<string>/private/var/spool/fax</string>
<string>/private/var/spool/uucp</string>
</array>
<!-- standard user paths we want to skip for each user (subpath relative to root of home directory) -->
<key>UserPathsExcluded</key>
<array>
<string>Library/Application Support/SyncServices/data.version</string>
<string>Library/Caches</string>
<string>Library/Logs</string>
<string>Library/Mail/Envelope Index</string>
<string>Library/Mail/Envelope Index-journal</string>
<string>Library/Mail/AvailableFeeds</string>
<string>Library/Mail/Metadata/BackingStoreUpdateJournal</string>
<string>Library/Mail/V2/MailData/Envelope Index</string>
<string>Library/Mail/V2/MailData/Envelope Index-journal</string>
<string>Library/Mail/V2/MailData/AvailableFeeds</string>
<string>Library/Mail/V2/MailData/BackingStoreUpdateJournal</string>
<string>Library/Mail/V2/MailData/Envelope Index-shm</string>
<string>Library/Mail/V2/MailData/Envelope Index-wal</string>
<string>Library/Mirrors</string>
<string>Library/PubSub/Database</string>
<string>Library/PubSub/Downloads</string>
<string>Library/PubSub/Feeds</string>
<string>Library/Safari/Icons.db</string>
<string>Library/Safari/WebpageIcons.db</string>
<string>Library/Safari/HistoryIndex.sk</string>
</array>
</dict>
</plist>

Macintosh Security Site -> About SecureMac.com


http://www.securemac.com/about.php



Spyware keylogger 

Mac OS X Hidden Files & Directories


http://www.westwind.com/reference/OS-X/invisibles.html



.DS_Store
~/.Trash
.Trashes
/.hotfiles.btree

.Trashes, .fseventsd, and .Spotlight-V100


http://hostilefork.com/2009/12/02/trashes-fseventsd-and-spotlight-v100/




Mac OS X 10.5 Leopard: FSEvents


http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars/7


FSEvents  BE OS 


Arbitrarily extensible file system metadata

Automatic metadata indexing and integrated query

Friday, November 11, 2011

Instructions of how to configure ReadyNas Rsync protocol for backups.



It would be great to create a step-by-step guide to backing up a ReadyNAS to a local USB drive for those of us newbies who are, well, new to the whole thing  I'm a bit at a loss, because my searches of the forums are coming up with contradictory information. For example:

viewtopic.php?p=240107#p240107
viewtopic.php?p=266997#p266997

One says that the source should be a 'remote: rsync server' the other says that the destination should be an 'rsync server'. It's not clear if both methods work, or if one is preferred over the other.
(Per below & experience: both methods DO work and neither is preferred, however, if you want to backup private home shares with rsync, then you must set the destination to be the 'remote: rsync server')
(Another situation where 'remote: rsync server' must be the destination is if you are trying to backup your an entire ReadyNAS volume at once. In that case, your 'souce' becomes 'volume: <volumeLetter' and the destination is configured as described below.

I also can find no documentation about the syntax allowed in the 'exclusion list'. Is it only for files and directories? Are wildcards allowed? How are the directories notated?
(Wildcards--at least '*' and '?' are indeed valid.)

And so on....


Here's what I've come up with so far. I'd love it if folks can add in the missing steps or clarify any of the missing pieces (currently based on my setup--ReadyNAS Pro Business and RAIDiator 4.2.15). Since I am focused on LOCAL backups, I will ignore any of the possibilities of using Rsync over SSH or the need to set specific rsync users & passwords:

1. Enable Rsync service in Frontview: Services->Standard File Protocols->Rsync

2. Set Rsync permissions on the shares you want to backup (your source shares): Shares->Share Listing
NOTE: if rsync only has 'read-only' permissions to your source share, you will need to give rsync 'read/write' access if you ever want to use rsync to restore to that share.

3. Set Rsync permissions on the USB Storage Device(s) you are backing up to (your destination shares). The default of 'read/write' is fine.

4. Define your backup job(s) in Frontview: Backup->Add New Backup Job.

4a) Set up the Source:
- I find it easiest to think of the source being the rsync server, so unless I'm backing up a home share, I always use 'remote: rsync server' up here.
- Since we are backing up your local ReadyNAS, your hostname can be any of the following: <ReadyNAS name>, localhost, 127.0.0.1
- The path to your backup source: <shareName>/<folderStructure> (note that the trailing '/' is not strictly needed, but the beginning of the path should NOT include a '/') Also note that this path is CASE-SENSITIVE.
- Your login & password should be blank if you haven't set any of the shares in step 2 to require an rsync user/password.
- The option to tunnel rsync over ssh is not needed since were only concerned with local backups
- The option to 'enable compression' should remain unchecked. It's not useful when backing up to a local destination since bandwidth is not a concern.
- The option to 'remove deleted files' is worded in a slightly misleading fashion. This option will remove files from your backup destination that no longer exist on the source when doing incremental backups. (Also, the same thing holds true when using the rsync server as a destination, although the wording is still confusing.) Using this option means that your backup will basically be an exact duplicate of your source as of the backup time.
- Enter your exclusion list. For example, if I wanted to exclude my lossy photos and only keep my RAW versions, I could use "*.jpg,*.JPG" The exclusion list is case-sensitive, so if your file extensions are a hodge-podge of capitalization, it's possible that your results will not be as you expect. File paths work here too--also in conjunction with files themselves.

4b) Set up the Destination:
- Choose the share on your USB drive that you defined rsync permissions for in Step 3.
- You can leave the 'host' field blank.
- Enter the path to your backup destination: <folderStructure> (again, note that there is not a leading '/'). Case-sensitivity is still important.
- Unless you defined an rsync login/password for your USB share, you can leave these blank.

NOTE: If you are using the rsync server as the destination, you will have to enter your USB share as the first part of the path. This is ALSO case-sensitive (ie. USB_HDD_1_1 is not the same as usb_hdd_1_1).

4C) Set up the schedule:
- The frequency is how often the backup job will be triggered in a single day.
- The hours are when it will begin trying to trigger, and when it will stop trying. This is important if you have multiple jobs scheduled. If Job1 continues past both the START and END times of Job2, then Job2 will never trigger.
- Check off which days you want the preceding rules in effect.

4D) Set up Full/Incremental & Special options:
- Choose how often you would like a full backup to be performed as opposed to incremental backups.
- Choose your Log file verbosity
* Note: the option to remove the contents of the backup destination ONLY takes effect when a full backup is being done (per the schedule in the first option).
- Because we are only backing up locally, the ownership change option doesn't really apply, but it is an important tool to have if you back up remotely or plan on moving your USB drive to a different unit to restore files.

Thursday, October 6, 2011

Kerberos Check

dscl -u diradmin /LDAPv3/127.0.0.1 -read /Config/KerberosKDC

and from

cat /Library/Preferences/edu.mit.Kerberos

DNS check

The first thing I would check would be DNS. This sort of flaky binding and authentication behavior is classic bad DNS.

Run the following commands on the server and on your client machines and make sure the results always match. Proper forward and reverse DNS is important for OS X Server.

nslookup <hostname of the server>
nslookup <ip of the server>
dig <hostname of the server>
dig -x <ip address of the server>
host <hostname of the server>
host <ip address of the server>
dscacheutil -q host -a name <hostname of the server>
dscacheutil -q host -a ip_address <ip address of the server>

On the server only, run this:
sudo changeip -checkhostname

It should say "Success. The names match. There is nothing to change." -- If it says anything else, DNS is broken.

- Mike