Note that there are some explanatory texts on larger screens.

plurals
  1. PORsync bash script and hard linking files
    text
    copied!<p>I am creating a bash script to backup my files with rsync. </p> <p>Backups all come from a single directory. I only want new or modified files to be backed up.</p> <p>Currently, I am telling rsync to backup the dir, and to check the files compared to the last backup.</p> <p>The way I am doing this is</p> <pre><code>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 </code></pre> <p>I am pretty sure I have the syntax correct for this. Each backup will check against the "Current" folder, and upload only as necesary. It will then delete the Current folder, and re-create the symlink to the newest backup it just did. </p> <p>I am getting an error when I run the script:</p> <blockquote> <pre><code>rsync: link "/Backup/Backup-2010-08-04-12:21:15/dgs1200series_manual_310.pdf" </code></pre> <p>=> /Backup/Current/dgs1200series_manual_310.pdf failed: Operation not supported (45)</p> </blockquote> <p>The host OS is running HFS filesystem, which supports hard linking. I am trying to figure out if something else is not supporting this, or if I have a problem in my code. </p> <p>Thanks for any help</p> <p>Edit:</p> <p>I am able to create a hard link on my local machine. I am also able to create a hard link on the remote server (when logged in locally) I am NOT able to create a hard link on the remote server when mounted via afp. Even if both files exist on the server. </p> <p>I am guessing this is a limitation of afp. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload