nb Core Community
February 09, 2012, 06:14:02 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 1.2.3 +nb is now final and released

@new registrations. I will not allow any new registrations here as there are more (real person) spambots here than ever.... captcha proved to be ineffective.

After your registration, mail me at ( admin AT shinobilegends.com ) from the mail address you want to register. Provide some text about you and possibly your game.
 
   Home   Help Search Calendar Downloads Login Register  
Pages: [1]
  Print  
Author Topic: Backup Script  (Read 2492 times)
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« on: July 19, 2008, 04:43:50 pm »

I recently rewrote my server backup script to something ... more fitting.

It's now from PHP rewritten completely to Perl. All you need is to be able to execute perl files.

if anybody is interested, please state so here.

brief description:

-monthly, daily, weekly backups
-daily get transferred via ftp
-generates or adds to a log file
-stderr is used for errors, if you execute it via cronjob (recommended) cron will email you any output to your email address
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Iori
Guest
« Reply #1 on: July 25, 2008, 11:54:41 am »

Hi, I'd be interested in automated backups, as my server's backup functions seems to break things (as yet unresolved).
Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« Reply #2 on: July 25, 2008, 03:26:27 pm »

ok.

small checklist:

  • do you have Perl installed and usable on your machine?
  • do you have the mysqldump command you can use from the console (command line)
  • do you have the ability to run a cronjob from inside your CPanel or whatnot (NOT recommended to use free cronjobs from the outside, script should *not* be in any accessible directory or you will face random backups in the worst case or a full disc)

OOC:
At your dp post about showtabform, I'll check that and I believe I always wondered why "showtabformindex" is necessary to be saved ... I'll investigate that later as you brought it up and it sounds valid =)
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Iori
Guest
« Reply #3 on: July 25, 2008, 04:00:44 pm »

ok.

small checklist:

  • do you have Perl installed and usable on your machine?
  • do you have the mysqldump command you can use from the console (command line)
  • do you have the ability to run a cronjob from inside your CPanel or whatnot (NOT recommended to use free cronjobs from the outside, script should *not* be in any accessible directory or you will face random backups in the worst case or a full disc)

1)There's a big list of installed perl modules viewable from cpanel...dunno if that means perl is installed
2) No idea. How do I find out?
3) yes, cpanel has crontab software

I will get in contact with the server's owner. Perhaps he could answer these questions...

Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« Reply #4 on: July 28, 2008, 02:50:49 pm »

Simply ask

"can I execute perl scripts I put in my web directory via crontab?"

"do you have the command mysqldump installed?"

"do you enable ftp transfer from within mentioned perl scripts?"
(last one optional if you want ftp or not)
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Iori
Guest
« Reply #5 on: July 30, 2008, 10:00:44 am »

Sorry for the late reply. I am informed that commandline access is unavailable on my server, so it is not possible. Thanks anyway!
Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« Reply #6 on: July 30, 2008, 01:01:30 pm »

 Roll Eyes you don't need commandline access... you only need the option to *run* scripts via Perl, you don't need to login to the console for that.

But alright ^^ it's working pretty great currently. Actually one of the first pieces of software that was installed and just worked after a few tweaks Oo
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Boofo131
Guest
« Reply #7 on: August 14, 2008, 12:57:41 am »

Just curious here... why did you rewrite it in Perl? I have been using a PHP one for a few years and it still works great.
Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« Reply #8 on: August 14, 2008, 06:12:37 am »

php cannot access ftp directly -> no error messages if the FTP fails

perl is closer to the shell -> no system("") stuff

in perl I can rerout STDOUT and STDERR with ease, in php not

etc
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!