Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 163819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:38:03+00:00 2026-05-11T11:38:03+00:00

I have a tar.gz with a full mysql database update that I can access

  • 0

I have a tar.gz with a full mysql database update that I can access via ftp.

This tar.gz updates daily and I would like to create a php and/or mysql connection to that ftp account that would allow me to run that large sql query on my local mysql server.

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:38:03+00:00Added an answer on May 11, 2026 at 11:38 am

    (I’m going to go out on a limb and assume you want to do this from a unix box of some kind…)

    Throw this:

    #!/bin/bash  wget                        \     -O -                    \     --ftp-user=username     \     --ftp-password=password \     'ftp://wherever/whatever.tar.gz' | tar xzOf - | mysql --user=whoever --password=secret dbname 

    in a file (update-db.sh for example) then chmod it:

    chmod 755 update-db.sh 

    then you can just:

    ./update-db.sh 

    whenever you want to download the update. Or you can throw it into a cron job (man crontab).

    Edit: Added the O flag to tar so that it extracts to stdout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you have tar travel to a certain direct and then tar files relative
I have a large number of files in a .tar.gz archive. Checking the file
I have a directory I’m archiving: $ du -sh oldcode 1400848 $ tar cf
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have a tar backup from an old subversion server which has long since
I have this simple JSP page in Eclipse and the first line in the
I have a website where I have .tar.gz, .zip and .dmg files. I need
I have a tar.gz file about 13GB in size. It contains about 1.2 million
I have the following code for extracting a tar.gz file whilst keeping tabs on
I have two nodejs http servers, one requests a tar file from the other.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.