Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 984399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:00:34+00:00 2026-05-16T05:00:34+00:00

I am creating a bash script to backup my files with rsync. Backups all

  • 0

I am creating a bash script to backup my files with rsync.

Backups all come from a single directory.
I only want new or modified files to be backed up.

Currently, I am telling rsync to backup the dir, and to check the files compared to the last backup.

The way I am doing this is

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 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.

I am getting 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)

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.

Thanks for any help

Edit:

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.

I am guessing this is a limitation of afp.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:00:35+00:00Added an answer on May 16, 2026 at 5:00 am

    Two things from the man page stand out that are worth checking:

    If file’s aren’t linking, double-check their attributes. Also
    check if some attributes are getting forced outside of rsync’s
    control, such a mount option that squishes root to a single
    user, or mounts a removable drive with generic ownership (such
    as OS X’s “Ignore ownership on this volume” option).

    and

    Note that rsync versions prior to 2.6.1 had a bug that could
    prevent –link-dest from working properly for a non-super-user
    when -o was specified (or implied by -a). You can work-around
    this bug by avoiding the -o option when sending to an old rsync.

    Do you have the “ignore ownership” option turned on? What version of rsync do you have?

    Also, have you tried manually creating a similar hardlink using ln at the command line?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a bash script to create new EC2 instances and then upload a
I'm creating a bash script to generate some output from a CSV file (I
I'm creating a bash script that will load CSV files using SQL*Loader. Please refer
I'm creating a bash script that will run a process in the background, which
I am creating a bash script for generating certificates. The openssl command that creates
I am in the process of creating a bash script that would log into
I am creating a simple bash script to download and install a python Nagios
What is the best way to run all Python files in a directory? python
I have a bash script which takes a single argument and returns around 8-10
While writing a bash script to help creating polaroid thumbnail using Imagick's convert commmand.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.