Errors backing up with rsync

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
AndrewB
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Sat Mar 16, 2013 10:39 pm

Errors backing up with rsync

Post 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.
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re: Errors backing up with rsync

Post 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
AndrewB
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Sat Mar 16, 2013 10:39 pm

Re: Errors backing up with rsync

Post by AndrewB »

Thanks Ysbrand,

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

Andrew.
Post Reply