Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've mounted my NAS drive under the /media/ directory. I've copied a bunch of files from my current /var/www directory, using cp -Rpv (preserve). Now I want to do a

cp -Rup /var/www/ /media/magneto/testing.cdw/

Based on the fact that these are two different file systems, i.e. one is a networked NAS connected through Samba, and the other is my computers internal drive.

Will I run into problems with the date and time? how can I check before I run the copy?

share|improve this question

According to the man page for cp, -p should certainly preserve the timestamps. I don't think that the filesystem would cause an issue.

share|improve this answer

If you want to have differential updates to a filesystem then the de facto tool to use is rsync. You can run it in dry-run mode (-n) to see which files it will transfer before the actual operation.

share|improve this answer

The safest thing to do is copy 1 small file, then test.

Over a network connection, rsync provides better options for recovery than cp -R, as in my experience, bulk copies to NAS often run into problems.

Whether or not date and time copy properly will depend on a number of factors, including the underlying FS on the NAS, and quite how the NAS is exposing SMB/CIFS - this can vary from manufacturer to manufacturer, and browser-configured permissions aren't always quite what you expect.

share|improve this answer

I have also a NAS on my LAN, I'm using cronjobs to rsync data from 3 LAN nux machines to the NAS. rsync is using ssh so you just need to make sure of public/private key exchanges between both machines. I'm using keychain for this. This works perfectly in my case. No stress about backups then.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.