Page 1 of 1

Errors backing up with rsync

Posted: Sat Mar 22, 2014 12:16 am
by AndrewB
When setting up an rsync backup for my meteohub, the following error was reported:

Code: Select all

rsync: opendir "/lost+found" (in data) failed: Permission denied (13)
I was using the rsync syntax from the user manual:

Code: Select all

$ rsync -uav rsync://root@192.168.0.71/data mymeteohubdata
On SSH'ing onto the meteohub, I find:

Code: Select all

meteoplug:~# ls -l /data
total 33332
drwxr-xr-x  2 root root     4096 Jan  8  2012 export
drwxr-xr-x  2 root root     4096 Dec 15 08:15 graphs
drwxr-xr-x  2 root root     4096 Mar 20 00:16 log
drwx------  2 root root    16384 Jun 14  2009 lost+found
-rw-r--r--  1 root root 34047459 Feb  8 12:43 meteohub.backup
drwxr-xr-x  3 root root     4096 Mar 16  2013 myweb
drwxr-xr-x  2 root root     4096 Jun 14  2009 transfer
lrwxrwxrwx  1 root root       25 Jan 12 19:51 uploads -> /var/run/meteohub/uploads
drwxr-xr-x 19 root root     4096 Mar  1 00:00 weather
which shows lost+found to have distinctly different permissions from the other folders.

Any suggestions?
Do I forcibly change the permissions on lost+found?
is lost+found meant to be there? It looks a bit out of place.

Thanks.

Re: Errors backing up with rsync

Posted: Sat Mar 22, 2014 10:40 am
by YJB
Hi Lost+found is a standard directory in the root of each filesystem. Without going into too much detail, it's there for administrative purposes.

I personally do not see a need to make it part of the back process, so recommend to exclude it from your rsync.

Code: Select all

rsync -uav --exclude 'lost+found' rsync://root@192.168.0.71/data mymeteohubdata
Ysbrand

Re: Errors backing up with rsync

Posted: Sun Mar 23, 2014 11:03 pm
by AndrewB
Thanks Ysbrand,

That seems to work, and it's certainly cleaner than hacking the meteohub folders.

Andrew.