MySQL Forums
Forum List  »  Newbie

Re: Migrating MySql from Debian to Windows
Posted by: Barry Galbraith
Date: July 16, 2014 07:09PM

Bill,
Rick's comments are correct.
piping commands together is much more efficient that separate lines.
cd ing around is not the best

This is all *nix stuff and like I said before, Google is your friend (and so is RJ).

Here's what the script does.

a invokes the shell to process the commands
b does the backup
c changes to the sqlbackups folder
d compresses the backup with 7z
e encrypts the backup
f mounts a folder on 192.168.1.201 as /mnt/bak
g creates a Date variable and fills it with today's date.
h changes directory to the mnt/bak folder
i makes a folder named today's date
j changes folder back to the folder where the compressed backup is.
k copies the compressed backup to /mnt/bak/$DATE folder
l unmouts /mnt/bak
m is commented out. It would email the compressed encrypted backup file to joesmith@shaw.ca
n deletes the raw backup
o deletes the compressed backup
p deletes the encrypted backup

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Migrating MySql from Debian to Windows
July 16, 2014 07:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.