How to Use wget for Updating a Mirror via FTP ?

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 18th, 2009, 6:45 am

Assuming that databases are backed up daily to a folder on the remote filesystem, and a mirror of the remote filesystem was made using the -mirror switch for wget, what would a CRON job look like to have that FTP mirror updated daily via wget without downloading files that have not changed ?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 18th, 2009, 6:45 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 29th, 2009, 6:45 pm

Apparently it's as simple as using the --mirror flag just like the first fetching.

Code: [ Select ]
wget --mirror --ftp-user=user --ftp-password=pass -o /log.txt ftp://ftp.domain.com
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 68 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.