Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-09 11:52:21

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

[request] back up database

My guess is, Rob Sable’s database plug in is widely used and appreciated. Certainly is by me.

Could it be extended just a little, either with another plug in or hacking the code?

Here’s my idea: automate the db backup function.
I do it regularly, but have to do it manually, and that’s not ideal: I could get a server crash or similar disaster, and find I’ve lost a week’s work.

Any interest? – either modifying the code or building a small script that will automate the db back up.

Incidentally, I know auto back up can be done on a server using CRON (?), but its quite technical and quite challenging for non-technical people…..but maybe the operation for doing that could be integrated into the plug in, added onto it, or just provide some information on how it could be done.

Any takers?

It would be great to get this automated, saving back ups to an e mail address or similar.

Offline

#2 2006-11-09 13:27:30

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: [request] back up database

it would be quite handy.
i found more info aswell as a suitable software solution (untested) here
will research further.

Last edited by jayrope (2006-11-09 13:28:41)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#3 2006-11-09 16:07:20

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] back up database

Yep, I’ve been using AutoMySQLBackup form months now, to backup my whole database portfolio and email the reports and databases to a free gmail account set up specifically for that purpose.

Best thing, I only ever think about it when I want to step back to an older version of a database.

Works like a charm.

Offline

#4 2006-11-09 16:38:40

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: [request] back up database

AutoMySQLBackup works like a charm on my VPS.

I setup as a cron.daily job and every morning my databases are backed up, the cron job takes about 15 seconds to run. I started using it back in June of this year, I have it email me a status of the run and I do an rsync every morning to my local server.

I’ve tested restoring the backups locally and they work just fine, it’s great to have daily, weekly and monthly rotations of your data.

Offline

#5 2006-11-09 16:48:59

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] back up database

>hcgtv. Got to get the rsync, thing working. Do you know of a good idiots guide?

Offline

#6 2006-11-09 17:27:17

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: [request] back up database

Dale, this is a sample script:

#! /bin/sh

rsync -ave ssh --delete-during --exclude "/dev/" --exclude "/proc/" --exclude "/sys/" myvps:/ /home/myvps/

-ave ssh uses SSH and prompts you to signon to your host for the transfer.
—delete-during works on newer versions of rsync, I think from 2.6.4 on. It basically deletes on your target what has been deleted on your host during the directory traversal or else it does it at the beginning slowing down the process.
—exclude what directories to exclude from the host, notice the slashes and quotes.
myvps:/ the qualified name of your host and the directory to start from, I use a short name in my hosts file.
/home/myvps/ the local directory holding the synchronized files, backslash needed.

I have 2 scripts, daily and weekly. The daily one excludes a lot of stuff that doesn’t change very often but includes my web space, data and logs. The weekly one includes everything, just in case the VPS goes belly up. The daily one takes a few minutes to run, the weekly one takes about 15 to 20 minutes.

That should be enough to get you started.

Offline

#7 2006-11-09 18:19:37

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [request] back up database

I use this cron script in textdrive


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2006-11-17 20:47:32

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: [request] back up database

No takers?
Its interesting to see the solutions people are using, but can they be bolted on to Robs db plug in so you can manage automated db backup from the txp interface?

Offline

Board footer

Powered by FluxBB