Author Topic: cron backup not working?  (Read 2654 times)

Capitan

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
cron backup not working?
« on: June 17, 2009, 06:56:09 am »
It seems that cron backup is not working, as I set it for 7 days but it has been over a month since it created something in the tmp/backup dir.

Also, can I change the dir it backs up to?

Thanks!

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: cron backup not working?
« Reply #1 on: June 24, 2009, 03:39:30 pm »
It could be happening that PHP runs out of memory when creating the backup. Are you keeping a log of what cron is doing?

To change the dir where the backup is saved you have to define a new constant on 'config/config.php'. For example, if you want to save your backup on '/data/backups' you would need to add this:

Code: [Select]
define('BACKUP_FOLDER', "/data/backups")

Capitan

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: cron backup not working?
« Reply #2 on: June 24, 2009, 04:19:27 pm »
Thanks!

Does it matter if it's a 700 dir root.root that I specify?

Also, manual backup works, so I don't think it's a PHP memory error?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: cron backup not working?
« Reply #3 on: June 24, 2009, 04:48:11 pm »
If the dir is 700 and owned by root and your web server is ran by root then it will work. If the web server is ran by another user (which usually is, be it 'apache' or 'www-data') then it won't be able to write on the directory. You should change the owner or group of that directory or save in a new subdirectory owned by the web server user.

Try logging what the error is when cron runs so that we can help you further.

Regards.

Capitan

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: cron backup not working?
« Reply #4 on: June 29, 2009, 03:15:00 pm »
I added the line you suggested at the bottom of config file and unless I remove it my opengoo page is blank, I can't even login:)

Filip

  • Freshman
  • *
  • Posts: 12
    • View Profile
Re: cron backup not working?
« Reply #5 on: June 30, 2009, 03:16:36 am »
don't forget ";" at the end of the line

 

anything