[SOLVED] PDF files not being backed up correctly by rsync. Viewers can't open them.
I have a lot of PDF documents in my ~/Documents folder and I also have rsync scheduled to do a daily backup of that folder (among others).
When I looked at the backed up files I noticed that some of their icons have an 'X' in front of them. I tried to open these files with Evince and was given this error: Quote:
Quote:
Quote:
This only happens with about half of the PDFs that have been backed up. Others work fine. All of these documents are working fine in my home folder. It looks to me like rsync isn't writing these files correctly. Any idea what going on? |
Can you post the output of
ls -l of the relevant directory and also post the rsync command line you are using for backup |
Thanks for the fast reply.
Code:
andrew@andrew-desktop:/media/maxtor/andrew/Documents/LIN1NLA$ ls -l This is the script that performs the backup tasks. I used /etc/anacrontab to schedule it to happen daily. Code:
#!/bin/sh |
Now I feel stupid.
I tried Code:
sudo evince file.pdf Thanks for your help |
Yep - you've changed the owner to root and on the file you're having trouble with, only root has read access.
First, in that directory (as root) do chmod 755 * You probably want to change owner as well. I don't know what group your files would be, but as your user, type touch test && ls -l test to see what your group is (in the listing you gave above, the first "root" is the user and the second is the group" Then chown username:groupname * where username and groupname come from the touch line above (I'd assume andrew:andrew or andrew:users) Next time you use rsync, add the "a" option, it does a few things, but most importantly it preserves owners and permissions. Code:
rsync -aurt --progress --delete /home/andrew/Documents /media/sdb5/andrew |
All times are GMT -5. The time now is 07:08 PM. |