Forum Moderators: phranque

Message Too Old, No Replies

Preserve timestamps during server migration

Keep date last modified while migrating to a different virtual server

         

Lucas

6:16 pm on Aug 23, 2016 (gmt 0)

10+ Year Member



I’ve had a website for a long time and am finally adding SSL, which my hosting company provides only by moving to a different virtual LAMPy server (and apologies if I’m posting in the wrong place).

How do I keep the dates last modified untouched during the migration?

bakedjake

6:31 pm on Aug 23, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Try:

$ touch -m --date="1984-04-01" file.txt

graeme_p

7:10 pm on Aug 23, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



When file transfer is the problem, rsync is usually the solution.

Transfer the files with rsync, using the -a option (to also preserve permissions and a lot of other things) or -t

Lucas

1:44 pm on Aug 25, 2016 (gmt 0)

10+ Year Member



Thank you!

@bakedjake: Using “Send Raw Command…” on MacOS’s Transmit.app returns a blank response and no changes

@graeme_p: I’m trying rsync using MacOS’s Terminal.app with a VPN:
rsync -av rsync://me@example.com/test /Users/me/test
and I receive an error “failed to connect to example.com: Operation timed out”.

Because it never asked for my FTP password, my next step was going to be to try
rsync -av rsync://me:PASSWORD@example.com/test /Users/me/test
but sending a password like that would look like a bad idea. Thoughts?