0

When I run either of these commands, I get the error rsync symlink failed: Operation not permitted (1):

sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* \ 
--exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude="swapfile" --exclude="lost+found" \ 
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs" --exclude=".ecryptfs" /source \ 
/destination 

or

sudo rsync -rltzuv --delete --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* \ 
--exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude="swapfile" --exclude="lost+found" \ 
--exclude=".cache" --exclude="Downloads" --exclude=".VirtualBoxVMs" --exclude=".ecryptfs" / \ 
/media/hanif/CEDF-4BFB/Backup

Neither of these work. They both show the same error:

rsync symlink failed: Operation not permitted (1)

console

Can anybody help me to get this backing up properly?

earthmeLon
  • 11,247
  • Try the -K option see here: https://unix.stackexchange.com/questions/116775/how-to-copy-directory-structure-without-removing-symlinks – George Udosen May 13 '18 at 19:04
  • You can create a shorter command by putting all the excludes together. For example this Answer (that works): https://askubuntu.com/questions/1028604/bash-script-to-clone-ubuntu-to-new-partition-for-testing-18-04-lts-upgrade/1028605#1028605 uses: rsync -haxAX --stats --delete --info=progress2 --info=name0 /* "$TargetMnt" --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} – WinEunuuchs2Unix May 13 '18 at 19:29
  • the error is because symlinks get ignored without the -K option being used. also, instead of posting screen-shot, copy and paste your command line output into your question – Joshua Besneatte May 13 '18 at 19:50
  • Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools. This seems like a permission problem to me, rsync is not permitted to create symlinks under /media/hanif/CEDF-4BFB/Backup/. Please [edit] and provide the output of stat /media/hanif/CEDF-4BFB/Backup/. – dessert May 14 '18 at 06:21

1 Answers1

2

As you used the option -l or --links preserving symlinks, I suspect that you tried to copy symlinks to a FAT partition, which does not support symlinks, independently of rsync.