Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 10:54 am EST

Geeklog Forums

Automating GL Backup on Windows?


Anonymous

Anonymous
I would like to automatically backup the entire GL folder as well as the database each evening, anybody know of a good tool to handle this?Thanks!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

I would guess there is some equivalent for cron on Windows? If so, you could use this script.

bye, Dirk

 Quote

Status: offline

nurseryboy

Forum User
Chatty
Registered: 09/04/02
Posts: 43
Hello, If you can run .bat files on your server, and can set things in the Task Scheduler, then there is a pretty easy way. You can create a .bat file with this code in it: @echo off cd "c:mysqlbin" mysqldump --user=username --password=password --all thedatabase > c:/wherever/thesql.sql Just point the cd to the directory where mysqldump.exe is, change username to your username, and password to your password, thedatabase to the database you want to backup, and the .sql location to where ever you want the sql file to be created. (Change the forward slashes to backslashes.. GL doesn't seem to like backslashes, so I couldn't use them). Then, have Window's Task Scheduler run the file whenever you want. Im sure there is a way to have msdos set a different name for the file each time it does that, but I am no msdos expert. Hope that helps. I tried it out and it worked great for me. Matthew
 Quote

Anonymous

Anonymous
This looks good, is there a variable I could use to write the date in to the file name? I would like to keep multiple backups..
 Quote

Status: offline

nurseryboy

Forum User
Chatty
Registered: 09/04/02
Posts: 43
I have no idea, but hopefully someone else does Smile Matthew
 Quote

Anonymous

Anonymous
After toying with the batch files a bit, I have a batch file that you can setup in Scheduled Tasks to dump your gl database complete with the correctly formatted (date included) file name into your geeklog backups folder (so that you can see it when you look at the DB admin page).

Place these contents into a file called DateTime.bat.
Place these separate contents into a file called glbackup.bat.

Edit glbackup.bat to include your mysql user and password and db and correct path to where you want to store the two batch files.

Setup a Scheduled task to run glbackup.bat and you should be ready to go!
 Quote

Status: offline

emagin

Forum User
Regular Poster
Registered: 08/05/03
Posts: 92
Could this be set up to back up multiple MySQL databases on Win32 windows?
 Quote

All times are EST. The time is now 10:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content