67

I am trying to use rsync to maintain a backup copy of my Aperture library. When I run the sync command to see what would happen this is the outcome:

rsync --dry-run -r "/Volumes/Data/Aperture Library.aplibrary" "/Volumes/Backup"

skipping non-regular file "Aperture Library.aplibrary/Database/BigBlobs.apdb"
skipping non-regular file "Aperture Library.aplibrary/Database/Faces.db"
skipping non-regular file "Aperture Library.aplibrary/Database/History.apdb"
skipping non-regular file "Aperture Library.aplibrary/Database/ImageProxies.apdb"
skipping non-regular file "Aperture Library.aplibrary/Database/Library.apdb"
skipping non-regular file "Aperture Library.aplibrary/Database/Properties.apdb"

The "file" command says that at least the ".db" file is a "SQLite 3.x database". How can I sync these files with rsync?

0

2 Answers 2

83

It would seem those files are symlinks.

To copy them as symlinks, use --links (or -l).

To hard copy the files they are pointing to, use --copy-links (or -L).

For details see the SYMBOLIC LINKS section in man rsync.

1
  • My files are regular text files, not links still gave me this error message. Not sure why. However, these file do get copied to destination. A little strange.
    – Kemin Zhou
    Commented Apr 3, 2020 at 16:24
76

Use -a instead of -r. -a means to reproduce file hierarchies, including special files and permissions. -r only means to recurse on directories. For a backup, you want -a.

4
  • 4
    I'd say this is the practical solution, though the --links clarification is useful. I use rsync -hiva --log-file=log.txt source dest most of the time.. i like hiva ~ winter as a mnemonic
    – ptim
    Commented Dec 11, 2014 at 5:51
  • Not necessarily. For example I might not have permission to change groups on the destination. Generally you run with the maximum options you have permissions for if you want a complete backup, and you use options like --fake-root to try and simulate the rest.
    – Bill
    Commented Feb 29, 2020 at 13:22
  • 1
    "For a backup, you want -a", unless you're cloning to or from a FAT or exFAT filesystem, in which case -a is broken and you want -hvrtDl --modify-window=1. I mention this in my answer here. Commented May 21, 2023 at 9:49
  • From man: " --archive, -a This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything. Be aware that it does not include preserving ACLs (-A), xattrs (-X), atimes (-U), crtimes (-N), nor the finding and preserving of hardlinks (-H). The only exception to the above equivalence is when --files-from is specified, in which case -r is not implied. " Commented Jun 17, 2023 at 7:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .