Would --noTimes and --noChmod options operate on page bundles files?

I’m quite new to Hugo, discovered it a few weeks ago and I am already happy with it :slight_smile: .
I had an old php based Web site, becoming quite big and slow, and with some amount of scripting I managed to convert almost all of it to a brand new Hugo site, thank you very very much for all that great work !

My concern is about uploading the built site to my web host. I only have ftp, no possible ssh access to the server, and my site weights 1.2 Gbytes.
With my poor ADSL uplink throughput, I have for several hours uploading the full public dir.
With no SSH, I cannot use rsynch facilities to upload only the differential changes.

I have read almost all that has been written here and there about the --noTimes option, and I must say I have had some trouble understanding exactly its meaning, and the doc doesn’t help much.

After some experimentation, I found that the only thing almost working for me is: hugo --noTime=false , which preserves the time stamps on copied files to /public.

hugo => all files and folder have their time stamp set to copy time
hugo --noTimes => same
hugo --noTimes=true => same
hugo --noTimes=false => original time stamps are kept for static folder only

So it looks like the default is --noTimes=yes meaning No I don’t carry time stamps.

Anyway, this is a simple remark, my disappointment came when I realized that the scope of this is only the static folder … and I chose to use page bundles, which means that all my photos and other documents are spread across tenths of folders in the content directory…

Is there any mean for me to keep non changing files as they are when rebuilding the suite in order to minimize the upload ftp time ?

Thanks for reading me,

I understand that you cannot use rsync to transfer files to your host, but:

  1. Can you use it locally?
  2. Are you comfortable with the command line?

Thanks for answering!
Yes, I have no ssh access to the server (next time I’ll reniew, I will put a few more € to have it :slightly_smiling_face: ).
Yes I’m comfortable with the command line, even under windows I actually use the git bash console, and I read somewhere it is possible to install rsync for windows there.
Mmm, I’m starting to see where you want me to come to …
What if I had a local copy of my remote, that’s what you’re thinking about?

Yes. Looks something like this…

# Create archive directory
mkdir archive

# Clear public directory and build site
rm -rf public/*

# Create initial image of the live site
rsync -a public/ archive/live/

# --------------------------------------------------------------------
# Make changes to content, configuration, templates, etc.
# --------------------------------------------------------------------

# Clear public directory and build site
rm -rf public/*

# Add new and updated files to archive/updates, and remove empty dirs
rsync -ac --no-times --compare-dest=../live/ public/ archive/updates/
find archive/updates/ -type d -empty -delete

# Create list of files and directories that you will need to manually delete from the server
rsync -acn --delete --info=DEL public/ archive/live/

# --------------------------------------------------------------------
# Via FTP, upload new and changed files from archive/updates/
# Via FTP, manually delete files and directories as needed
# --------------------------------------------------------------------

# Clear the new files directory, and update local copy of live site
rm -rf archive/updates/*
rsync -ac --no-times --delete public/ archive/live/

Instead, spend the $ for ssh

Hi jmooring,
Thanks, yes I think I get the principle, I don’t know (yet) all the subtleties of rsync but I will study that and probably make a script to automate.
I was initially thinking I only needed a local replica of my remote site, so it’s the live folder in your proposal, and I see you create an intermediate folder with only the changes, I will experiment with it.
Thank you very much for your help, I think it should do the trick !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.