Rsync not copying contents of sub directories(recursive) when run from a cron job

Dominic Marks dom at helenmarks.co.uk
Thu Dec 7 13:04:35 GMT 2006


On Thu, 07 Dec 2006 12:21:54 +0000
Jason Cornock <jason at theinfra-red.com> wrote:

> Rsync not copying contents of sub directories(recursive) when run
> from a cron job=20
>=20
> Hi,
>=20
> I have a problem with rsync-2.6.8_2 where if I run the task manually
> all the folders and sub folders/files are copied across but when I
> run the exact same command from a cron job it fails to copy
> recursively, i.e I will get the folders but not the files within.

This is your own crontab, right? Otherwise it could be permissions.

> I am copying from the local system drive to a NAS running SMB/CIFS.
>=20
> Rsync command used:  rsync  -rlpgoDv --delete $source/
> $TARGET/$BACKUP_DATE/$source/.
>=20
> I am not us the =ADa flag because I am getting bad file descriptor
> errors failing to time stamp the files(if anybody knows a solution to
> this too that would be marvellous!).

I wonder if CIFS has the same set of timestamps which your local file
system has. If it doesn't and network bandwidth is not a problem you
could tar up the data and copy it to avoid that. There is a probably a
way through it with rsync alone though.

A bad file descriptor message seems like a strange an error for failing
to set a timestamp to me.

> Any help or guidance much appreciated.
>=20
> Jason
>=20

Dom




More information about the Ukfreebsd mailing list