osx - Rsync bash script and hard linking files -
I am creating a Bash script for backup with my files rsync
Backup all one I just want to back up new or modified files that come from the directory.
Currently, I'm asking rsync to backup, and to check the files in comparison to the last backup.
The way I am doing this
THE_TIME = 'date' +% Y-% m-% dT% H:% M:% S "` rsync -ap - link-dest = / backup / current / usr / home / user / backup / backup / backup- $ THE_TIME rm -f / backup / current LN-S / backup / backup- $ THE_TIME / backup / current
I believe that the syntax for this is correct. Every backup will check against the "current" folder, and upload it only as upload, it will then remove the current folder and the symlink to the new The minimum will recreate the backup.
I get an error when I run the script:
rsync: link "/ backup / backup-2010-08 -04-12: 21: 15 / dgs1200series_manual_310.pdf "
=> / backup / current / dgs1200series_manual_310.pdf failed: operation not supported (45)
Host OS is running HFS file system, which supports hard linking. I am trying to figure out if something else is not supporting it or if there is a problem in my code Thanks for any help
EDIT:
I am able to make a hard link on my local machine. I can also make a hard work on the remote server (when logged in locally) I am not able to make a hard link on the remote server when mounted via APP. Even if both files are present on the server
I'm guessing that this is a limit of APP.
There are two things from the man page that are worth checking:
< P> If the file is not being linked, double check their attributes. Also check whether certain features are being forced out of control of rsync, such a mount option that roots a single user, or mount removable drives with normal ownership (like OS X's "This Ignore ownership over quantity "option).
and
Note that before 2.6.1 there was a bug in rsync versions that worked properly for non-super-users - Link-dest can be stopped when -O was specified (or vested by A).
Do you have the "undefined owner" option turned on? Can you work around this bug by avoiding the current-bug option? What version of rsync
is?
In addition, have you tried to create a similar hardlink manually by using ln
on the command line?
Comments
Post a Comment