boto_rsync
boto_rsync copied to clipboard
crashes on borken symlinks
This tools is fantastic-- but it seems crash on broken symlinks. Telling it to ignore 0 byte files doesn't solve it, since the symlinks are not 0 bytes. Maybe I'm missing something...
www/boi-cms.old/taps_ctrl.sh
Traceback (most recent call last):
File "/usr/local/bin/boto-rsync", line 1150, in
shells
Muttrc
pam.conf
nanorc
legal
Traceback (most recent call last):
File "/usr/local/bin/boto-rsync", line 1150, in
ckelty@beadle:/etc/backup$ ls -al /etc/blkid.tab
lrwxrwxrwx 1 root root 15 2011-07-23 16:47 /etc/blkid.tab -> /dev/.blkid.tab
ckelty@beadle:/etc/backup$ ls -al /var/www/boi-cms.old/current
lrwxrwxrwx 1 capistrano www-data 40 2012-04-12 14:20 /var/www/boi-cms.old/current -> /var/www/boi-cms/releases/20120412212119
ckelty@beadle:/etc/backup$
Thanks, I'll check it out when I finally get back to updating this project.
In the meantime, should anyone come here for answers as I did, you can remove broken symlinks with
find -L /dir/to/traverse -type l -delete
Notes: run without the "-delete" for a listing works for me on mac osx and debian source: http://www.commandlinefu.com/commands/view/2369/find-broken-symlinks-and-delete-them
HTH, Pete.
You can avoid purging dangling symlinks by applying zackse/boto_rsync@1813325e20006be131745ba4aca1091ded17ab28, which will skip any files that cannot be stat()'ed.