Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I have a 320GB drive as my 1st dirve on DNS-323 and want to copy all the files on it to a 500GB. I tried couple of times using rsync to copy files from the 320GB drive to the 500GB but the result is not what I want.
If I use rsync -av /mnt/HD_a2 /mnt/HD_b2, all the files are copied but the files are under /mnt/HD_b2/HD_a2.
If I use rsync -av /mnt/HD_a2/* /mnt/HD_b2, all the files except files start with . are copied to the root directory of /mnt/HD_b2. Is there a switch where I can copy all the files including the hidden ones to the root directory of /mnt/HD_b2? I know I can use mv after "rsync -av /mnt/HD_a2 /mnt/HD_b2" but want to know if there is a more proper way of doing it.
Thanks.
Offline
I think that I would try:
rsync -av /mnt/HD_a2/ /mnt/HD_b2
The rsync man page says:
A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination.
You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to
"copy the directory by name", but in both cases the attributes of the containing directory
are transferred to the containing directory on the destination. In other words, each of the following commands
copies the files in the same way, including their setting of the attributes of /dest/foo:
rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo
So,
rsync -av /mnt/HD_a2 /mnt/HD_b2
rsync -av /mnt/HD_a2/ /mnt/HD_b2
rsync -av /mnt/HD_a2/* /mnt/HD_b2
all do different things. The last of the three uses '*', which just matches the non-hidden files.
Since your backup disk is bigger than your source disk, you might consider using rsnapshot, which uses rsync under the covers to do pretty much what you are doing, plus it can keep "time-machine" style backups of older versions of your files. The backup files will take more space than the source files, depending on how often they change, etc. I use rsnapshot to shadow my A disk to my B disk; it is worth looking at.
Offline
Here is a cool little tutorial that tells how to do an rsync in crontab so it will rsync on a time schedule. If run this tutorial and it does work:
http://abuhawa.wordpress.com/2009/05/16 … tab-rsync/
You can modify the script to fit your needs. It's not a hard script to figure out.
Offline
I used rsync -av /mnt/HD_a2/ /mnt/HD_b2 as suggested by karlrado and got what I wanted.
Offline