title: lftp mirror directory and all its subdirectories
body: <p>Here's my problem I'm having. I want to download or "backup" a folder with a bunch of other folders in it using LFTP. My folder hierarchy looks like this. </p>
  
  <pre><code>Documents 
  -Music
  --Unknown_artist 
  ---Unknown_CD
  -Pictures
  --summer_pics
  --Denver
  ---Brewery
  ---Foot_ball_game 
  </code></pre>
  
  <p>So i want to download or backup the Documents directory and all its components. I am restricted by only using strictly FTP. </p>
  
  <p>I love using LFTP because of its pget command. </p>
  
  <pre><code>@#&gt; lftp server.com -u username,pass -e 'mirror Documents --use-pget-n=16 &amp;&amp; exit' 
  </code></pre>
  
  <p>This works but it only downloads the Documents directory and non of its sub directories. 
  Now i can manually go into each directory and download them that way, but there has to be a flag im missing or something im not reading right in the documentation. </p>
  
  <p>In the documentation i saw that there was a "mirror -r" flag that states "don't go into subdirectories" So i should be downloading subdirectories without the "-r" right? </p>
  
  <p>I figured it out ..</p>
  
  <p>The answer is </p>
  
  <pre><code>@#&gt; lftp server.com -u username,pass -e 'glob -d mirror Documents --use-pget-n=16 &amp;&amp; exit'
  </code></pre>