4 replies
by yapanitz Accepted solution
by tony hopkinson Accepted solution
it's just a straight file copy/archive manouevre, usually followed by a zip.
Bash or Perl and then scheduled will be a lot easier though. If you do it through PHP that means Apache will need access to the files themselves.
Then there's do you want to shut myslql down while doing it, especially the restore.
Then there's security on calling the PHP to do it.
All solvable, but I've no idea whether it's worth the effort, becaue you haven't said why.
Look up PHP and shell commands as a start though.
by yapanitz Accepted solution
by tony hopkinson Accepted solution
You can do an archive and zip while the database is going, but there is a possibilty that you could get part of a transaction.
How likely that is something you'll have to look at.
Running a shell script (choose waht ever shell you are comfortable with will be way easier than writing all this in PHP.
Whatever admin means logging in to your web site, it's is necessarily the sql admin, the admin who can see the files in the my Sql folder, or the back up folder, it will be account teh apache daemon is running at that will need the required privileges, (or teh batch file if you go that way.
Ther's nothing in what you said that cuts out MySQLDump, either, that would be much easier.
kick one off then have a Cron Job, that looks for the files, tar, zip, even dump to external media...
Restoring is a whole 'nother kettle of worms, having the db active while that is happening would be nuts.
Isn't on line, yet, equals design for when it will be, otherwise it will be a temporaraily permananent solution.
Why don't they just use PhPMyAdmin by the way?
This is bass ackwards, get them or your DBa to write a script in something to do the work and then just call it from PHP.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending