LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-14-2018, 04:42 AM   #1
mark4asp
LQ Newbie
 
Registered: Oct 2017
Posts: 6

Rep: Reputation: Disabled
SQL Server database backup automation


I want to do:
Do SQL Server database backup automation

1) take database backup on schedule
zip database files,
take a fingerprint of the zip (perhaps as the same file)
transmit to another PC

2) at receiving PC:
check backup zip arrives
test the file integrity
send alarm message if it fails.

NOTE: Currently. On the database servers, backups are taken and sent by SqlBackupAndFtp (free version) but the process is not monitored and I suspect failure messages are not even sent.

QUESTION:
3.1) Is there Linux software which does the 2nd job (2), at the receiving end. For several backups, arriving from several servers?
3.2) Or does anyone have links to blogs which describe examples of this process scripted?
 
Old 12-14-2018, 09:10 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Is this homework? If so, tell us what you have tried.

Also, do you have physical access to the server or is it running on a hosting service somewhere?

I'll go a little further. If you have physical access to the server, write a script to dump the database, then call the script via a cron job. (If this is homework, that ought to point you in a good direction to get started.)
 
Old 12-15-2018, 01:03 AM   #3
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Assuming this is MySQL and not MSSQL (since we are on LQ)
This can be easily done with:
- mysqldump then zip
- md5sum for integrity check
- rsync / sftp to copy to another machine
You should be able to find plenty of examples of above with your favorite Internet search engine
-----
And, if you are not comfortable with above, have you looked at this: https://sqlbackupandftp.com/blog/weblog
 
Old 12-15-2018, 02:21 AM   #4
mark4asp
LQ Newbie
 
Registered: Oct 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the replies

To frankbell:

I've tried nothing yet. Given you recommended no Linux software, I'll assume you think it's best done with scripts. Would you use bash for this or do you recommend I try a more modern scripting language?

I have physical access to none of these servers. I can get in to the Linux server via PuTTY with the root account. Access to the Windows servers is not so easy.

We already use the free version of SqlBackupAndFtp. But the alarm messages are only available in the paid version. See: https://sqlbackupandftp.com/blog/service-down-alerts. I could have a basic alert service if we upgrade to a paid version.

To dc.901:

They are windows MSSQL database servers. I want to collect all the backups on one Linux server. Then check those backups arrived in healthy state.

I'm not sure I need to use an MD5Sum check. 7zip has a "test archive" feature which tells you whether the archive is good. This will be a more comprehensive check.
 
Old 12-17-2018, 06:26 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Back Up and Restore of SQL Server Databases

"Healthy State"?
Recovery Models?
Full
Partial
Differential
Copy Only
Transaction Logs
Possible Media Errors

What is your current backup and restore procedure?

Last edited by Habitual; 12-17-2018 at 06:27 PM.
 
Old 12-17-2018, 08:35 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
When I did something like this many years ago, I did it in bash and it worked like a charm. I also learned a lot.
 
  


Reply

Tags
backup, database, schedule, zip



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Moving with SQL Server to Linux? Move from SQL Server to MySQL as well! LXer Syndicated Linux News 0 11-28-2016 02:02 PM
SQL update statement to SQL SERVER 2005 scheidel21 Programming 2 11-05-2009 06:30 PM
(my)sql: drop database doesn't remove database kpachopoulos Programming 3 09-19-2007 01:32 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration