Including a hidden directory in an rsync backup - Help please

Commissario
Joined
16 Oct 2002
Posts
343,951
Location
In the radio shack
Hi folks,

I run an rsync backup of a directory from a Pi to my NAS on a nightly basis and I've just realised that the hidden .git directory within /home/sysop/spidr isn't being copied.

The NAS is mounted at /home/pi/spiderback and backups go into a 'spider' directory in there which is just the date and time.

a41xlgA.png



This is the command I'm running nightly via cron.

Code:
rsync -aH /home/sysop/spider/ /home/pi/spiderback/spider/"$(date +'%Y-%m-%d-%H-%M-%S')"/

I've been trying with little success to make it copy that hidden directory as well.

Can anyone help please?

Thanks.
 
Yes, I know that but I can’t get my head around it. I’m after someone to actually fettle my command, not just quote the man page.
 
Back
Top Bottom