Home Man
Today's Posts

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Mirror a folder from the Internet to local machine

Login to Reply

Thread Tools Search this Thread
# 1  
Old 01-02-2018
Mirror a folder from the Internet to local machine

I have a machine in my LAN that runs Ubuntu and I have full access in it.
There is another PC on the Internet that has a public IP eg and it servers as https server and access to it is by username and password. On the remote PC all i have is access through https using username/passwd.

At the moment I'm logging to the ubuntu and using wget to get folders that I want.
I would like to automate the boring stuff and every 1 hour to check if the server has new content compared to the ubuntu's /var/www/html/x3 and /var/www/html/y7 local folders.
The Internet server has as series of folders eg x1, x2,...,xn, y1,y2,...,yn. i do need to get only 2 particular folder and its contents and not the whole server.
If those 2 folders have different content, then download the new content and delete the old ones in the corresponding folder.
It is a one way sync. is there any script that could do the job with cron, please?
# 2  
Old 01-02-2018
I think looking at the man pages of rsync command would be a good start, as rsync is very versatile and may just do the job you want, I used to use it to synchronise /etc/passwd and other changing stuff in clusters...
# 3  
Old 01-02-2018
Hi. Thanks a lot for the quick reply. I thought of rsync, but the only access to the remote PC is through https.
as i see it i need a script that checks the current directory against the remote. if there is difference then wget the new and delete the old ones.
# 4  
Old 02-09-2018
There's only one way synchronizing with wget -m <URL>
which will copy what in server to your local storage. Try
wget --spider .. read its official man; GNU Wget 1.18 Manual
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with fetching the data from remote machine from my jumpbox(local machine) whizkidash Shell Programming and Scripting 20 08-15-2014 11:42 AM
iptables applied in local machine, can't ssh remote machine after chain changed to DROP babinlonston Red Hat 2 06-05-2014 12:57 AM
FTP While transfering files to local machine to remote machine Venkatesh1 UNIX for Advanced & Expert Users 2 03-01-2013 09:58 PM
Taking mirror copy of the application id and password into the new UNIX machine kmanivan82 Shell Programming and Scripting 1 11-07-2012 06:45 PM
How to transfer files from unix machine to local machine using shell script? vidhyaS Shell Programming and Scripting 1 08-08-2011 10:27 AM
Solaris Volume Manager: Break Mirror and use to make a 2nd machine 4dailyrunner Solaris 1 02-15-2011 04:49 PM
How to create mirror disk in solaris machine? Wong_Cilacap Solaris 5 08-04-2010 03:40 AM
To find the LATEST file from a dir on REMOTE machine and SCP to local machine? me_ub Red Hat 3 07-08-2009 12:57 AM
x86 Sun Machine and Solaris Soft Mirror tien86 Solaris 5 05-24-2009 04:33 AM
Copying multiple folders to local machine (don't know folder names) leenyburger UNIX for Dummies Questions & Answers 5 06-12-2008 07:38 AM

All times are GMT -4. The time now is 04:33 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password