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 6772069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:30:21+00:00 2026-05-26T15:30:21+00:00

So I have a script that does attempts to create a sql file on

  • 0

So I have a script that does attempts to create a sql file on the server, and then zips that file up. I’m having an issue where the GZip call is being executed before the file is written. The odd thing is that when I run this on my VM instance it’s totally fine. But when I test it on one of the servers, nothing but fail.

 echo "Backing up $DB..."
 $PROG_MYSQLDUMP -u $USERNAME -p${PASSWORD} -h $HOST $DB $IGNORES > ${DEST_FILE}

 echo "Zipping file...${DEST_FILE}"
 $PROG_GZIP $DEST_FILE

The only idea I have is to add a check before the GZip call is made that checks for the file and goes on only is it’s there else after like X checks fails. I don’t like this solution. Is there something I’m missing to get the script to wait on its own?

Thanks.

  • 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. Editorial Team
    Editorial Team
    2026-05-26T15:30:22+00:00Added an answer on May 26, 2026 at 3:30 pm

    There’s no way the gzip program could get started before the dump was written. Anyway, why aren’t you piping the dump in gzip? This should save time and temporary disk space. Also, it would reduce the load on the disks.

    $PROG_MYSQLDUMP -u $USERNAME -p${PASSWORD} -h $HOST $DB $IGNORES |
    $PROG_GZIP > $DEST_FILE.gz
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bash script that does ssh to a remote machine and executes
I have a PHP script that does the following: Uses file_get_contents() to get content
I have a ColdFusion script that does: <cfset content = replace(content,&##147;,,all)> Which replaces &147;
I have a ruby script that does a few perforce operations (through the scripting
I have a simple script that does some search and replace. This is basically
I have a PHP script that does basic encryption of a string through the
I have to write a Matlab script that does this: The input is 2
I have a script that seemed to work before but no longer does. It
Does anyone have a script for logparser that will output a graph for daily
Does anyone have an example of script that can work reliably well across IE/Firefox

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.