Gossamer Forum
Home : General : Perl Programming :

Auto Backup script..

(Page 2 of 2)
> >
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
I am assuming you've made some changes in the script, Andy. If you post a fresh copy of the script, I'll give it a whirl...
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Auto Backup script.. In reply to
Yup..sure have Smile I'm still working on extra features...(see first post)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Sorry, Andy, but your use of modules is still bugging me.

If you're going to be importing a method, then you don't need to create a CGI object (and subsecquently you can drop all $input-> from your script). You're importing methods from the module in a non-OO fashion and then you're creating a new object. It just doesn't make sense.

Cheers

- wil
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Argh, why do you keep quoting variables :)

chmod(0666, "$path_to_db");

Thats a pet hate of mine.

You are also using $_ in a split when split defaults to $_ so you don't need it....eg...

@foo = split /-/, $_

is the same as:

@foo = split /-/;

Not big deals but just better aesthetically and syntactically IMO

Last edited by:

Paul: Jun 27, 2002, 2:29 AM
Quote Reply
Re: [Paul] Auto Backup script.. In reply to
>>> aesthetically and syntactically IMO <<<

Getting into the big words huh? Wink I'll get that changed soon./ I'm working on a password protection thing for it at the moment, so people can't just go in and view all the MySQL login info, and add/delete stuff :p

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Hello,

Was this script every finished? I have a directory that has over 8000 images in it and I would like to skip it during my daily backup, I need a script that I can run from the browse that creates a new .tar file for me to download of my / directory (shared hosting account) and skips over a directory of my choosing. This scripts seems to be it, how did it go?

Thanks,
Wassim
Quote Reply
Re: [wassimk] Auto Backup script.. In reply to
Yeah, I did get it completed. You can get it here (attached). Not meant to be free, but for the gT community, what the hell Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Andy,

Thank you very much for this script!!! It's nearly 100% what I've been looking for, what I was hoping it would have is the ability to exclude the zip function and the specific directories. I have one directory I don't want because it's too large, and I belelive this is the command to do it. Can you help me modify this script to do that, or can someone help me write a small perl script to call via browse (I don't have SSH access) to run this? Any help is very much appreciated!

tar -cvpf /home/kmetdev/backup/wwww-`date '+%d-%B-%Y'`.tar \
--directory /home/kmetdev/public_html --exclude=/home/kmetdev/public_html/products/tids .

Thanks,
Wassim
Quote Reply
Re: [wassimk] Auto Backup script.. In reply to
Try this attached script. It should let you setup cron jobs (even without SSH/Telnet access). Just set that command to run Smile

Hope that helps.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
nice .. is it possible to sent the backup to an FTP automatically??

Can the script backup mysql database too?
Quote Reply
Re: [seby] Auto Backup script.. In reply to
Nah...unfortuantly it can't handle this...

Its not even meant to be a free script...should be $30 Wink It could probably be hacked to do what you want...but I can't do it for free, as that would cost quite a bit of time Frown

Sorry

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
** Is anyone still following this?

Installed Andy's script-- just what I've been looking for. And I've been doing A LOT of looking!

Questions:
What exactly is contained in the dump file? Is it text or...?

If the need arises, how do I use/restore the above file?

There are "advanced" options in the script, such as:

$lock_tables
$add_locks

And so on...

Which, if any, of these options are suggested? Seems to me the tables should be locked during backup [?]

Finally, [Andy] is there a new[er] version of this script? The page on your site is broken.

Thanks.
Quote Reply
Re: [jmueller] Auto Backup script.. In reply to
>>>Questions:
What exactly is contained in the dump file? Is it text or...? <<<

The actual data stored is in a MySQL dump format. i.e a text file, with things like;

Code:
INSERT INTO lsql_Links ...

>>>If the need arises, how do I use/restore the above file? <<<

Just use something like PHPMyAdmin or MySQLMan and do an import of the .sql file. It will import the data into the appropriate database.

>>>There are "advanced" options in the script, such as: <<<

These are just things that you may/may not want the script to use. Things like 'add drop columns' and stuff like that. Details on these extra functions can be found at MySQL.com.

>>>Finally, [Andy] is there a new[er] version of this script? The page on your site is broken. <<<

Unfortunmatly not. I took it off the market after a major flaw was found in it, whereas it kept on re-backing up the backup file...and thefore creating a HUGE backup file...which contained backups of the backup.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Ahhhh.... major flaw. Frown

So, far, it appears each new backup is over-writing the old file. Seems to be okay... So far.

** Do you have a suggestion on a different script?

Last edited by:

jmueller: Apr 10, 2003, 11:17 AM
Quote Reply
Re: [jmueller] Auto Backup script.. In reply to
The only way I can think of getting around it, is by deleting the file each time. I don't have a copy of the script on this PC....so I'm afraid I can't actual give you exact codes/places to put it. You would just need a rm call...something like;

`rm -r -f $file.sql`;

Again, I'm not sure on the format of grabbing the files name Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Auto Backup script.. In reply to
Mmm use unlink() not a system call.
Quote Reply
Re: [Paul] Auto Backup script.. In reply to
Andy, I'm not a Perl guy. Unsure

Should I be looking for a new script?
Quote Reply
Re: [jmueller] Auto Backup script.. In reply to
For those of you looking for a SQL backup script that works,
check this out:

http://worldcommunity.com/...es/mysql_backup.html
Quote Reply
Re: [jmueller] Auto Backup script.. In reply to
Interesting. I didn't realise there wwas a demand for something like this. I may write something if I get chance. I'm sure there are lots around (like the one you linked too) - it will be useful for me anyway I guess.
> >