XF2 [8WR] Database Backup

XF2 [8WR] Database Backup [Paid] 2.1.0.8

No permission to buy ($10.00)
Here is the actual article I followed,


I did have to ask my hosting service to install lsyncd on my VPS, which they did in a matter of minutes.

It took me about five minutes to go through the setup process. the only difference is that in that article, it mentions a conf file here

Code:
/etc/lsyncd/lsyncd.conf.lua

when the actual conf file should be here,

Code:
/etc/lsyncd.conf

and here are the necessary contents of the conf file,

Code:
sync { default.rsyncssh, source="/sourcedir", host="remote_ip_address", targetdir="/targetdir" }
settings {logfile = "/var/log/lsyncd/lsyncd.log", statusFile = "/var/log/lsyncd/lsyncd.status" }

It is running now and making a full uncompressed copy of my live site to my other VPS (which I wasn't using for anything, but which I have for another 2-1/2 years before my contract expires). Now, if I add any files anywhere on my site, they are automatically copied to the remote VPS. When users upload attachments, they are automatically copied to the remote VPS. If I install an add-on, the files are automatically copied to the remote VPS.

The nice thing is that once I have a full copy of everything transferred to the remote VPS, only new files will get transferred after that. So there is the initial big transfer and afterward just small transfers that don't hit my bandwidth real hard like a big backup of everything would do.

I use the add-on only to do nightly backups of the database and then to copy them to the remote VPS. I have it set to retain seven copies.

So I found out that PRIOR to starting the lsyncd, you need to first do a manual rsync to get the existing content of all directories onto the remote server if they don't already exist there. Once that is done, any new files will be transferred by the lsyncd. If you start with an empty remote server and go straight to lsyncd, only files created from that point on will be transferred to the remote server. Other than that, it works great.
 
I would say that lsyncd is more of a CDN synchronizer... and less of a backup system. Sure, you could use it as a backup system, but thats not really what it's designed for.
 
I would say that lsyncd is more of a CDN synchronizer... and less of a backup system. Sure, you could use it as a backup system, but thats not really what it's designed for.

Right. I just happen to be in a position where I have the extra VPS for another 2-1/2 years anyway. So in my particular case, lsyncd works well. If I were using some kind of storage service like Amazon or something else, then it probably wouldn't be the way to go.

As it is, it works really well for making a copy of my filesystem info, which doesn't really change much other than the uploading of attachments by users. Your add-on is great for making the backups of the database, retaining multiple copies, and moving them off to a remote destination! And, if I did not have the other VPS, I'd be using it for the file system as well.
 
I know someone who does a similar thing. He uses his website's VPS as a backup system for his home computer... in addition to Macrium Reflect and Carbonite. Kind of a ridiculous option honestly.
 
Just tried this again, still timed out unfortunately. Any ideas I can try?

Also have this in my AdminCP, if it helps.

Code:
Server error log
ErrorException: [E_WARNING] fopen(/home/domain.com/backups/2019-02-14/_metadata.txt): failed to open stream: No such file or directory src/addons/EWR/Backup/Repository/Backup.php:188
Generated by: Joe Link Feb 14, 2019 at 7:30 AM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fop...', '/home/dom...', 188, Array)
#1 src/addons/EWR/Backup/Repository/Backup.php(188): fopen('/home/dom...', 'w')
#2 src/addons/EWR/Backup/Repository/Backup.php(73): EWR\Backup\Repository\Backup->writeMeta(Array, 'EWRbackup_event...')
#3 src/addons/EWR/Backup/Cron/Backup.php(11): EWR\Backup\Repository\Backup->runBackup()
#4 [internal function]: EWR\Backup\Cron\Backup::runBackup(Array)
#5 src/XF/Admin/Controller/CronEntry.php(112): call_user_func(Array, Array)
#6 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\CronEntry->actionRun(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:CronEntry', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#8 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#9 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#11 src/XF.php(390): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(29) "/admin.php?cron/ewrBackup/run"
  ["referrer"] => string(50) "https://domain.com/admin.php?cron/"
  ["_GET"] => array(1) {
    ["cron/ewrBackup/run"] => string(0) ""
  }
  ["_POST"] => array(1) {
    ["_xfToken"] => string(8) "********"
  }
}
 
If it helps any, my much smaller site on the same server (same config) was able to complete successfully (it wasn't before this update).
 
Hi everyone; just updated to the newest 8WR database backup update. I am getting these errors in my ACP and under Backup -> Logs. I am not sure if this is an important error for @Jaxel to see; or just because an 'official' update has not run since the upgrade?

Code:
ErrorException: [E_WARNING] Invalid argument supplied for foreach() in src/addons/EWR/Backup/Repository/History.php at line 79

    XF::handlePhpError() in src/addons/EWR/Backup/Repository/History.php at line 79
    EWR\Backup\Repository\History->getMetadata() in src/addons/EWR/Backup/Admin/Controller/Index.php at line 32
    EWR\Backup\Admin\Controller\Index->actionView() in src/XF/Mvc/Dispatcher.php at line 321
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
    XF\App->run() in src/XF.php at line 390
    XF::runApp() in admin.php at line 13

There's a main ACP Server error (the above is from requesting the log) ...the main on displays some private tokens I think....so I won't include that. I will re-test after tonight's backup.

Thanks for any insight.
 
It seems the errors were thrown because a backup, since that feature was implemented, did not exist. However, I notice that there have been no backups since I installed this update - despite them being scheduled. @Jaxel / anyone --> does this system stop working while your forum is in development mode? Or is there a way to trouble shoot why they are not happening? If I manually run the cron job it works....

A little confused.

Thanks!
 
I didn't get an answer on this before so I'll update for everyone else, the FTP backups do not follow a retention policy. It will just keep uploading backups, so you will need to keep an eye on your storage space.
 
It seems the errors were thrown because a backup, since that feature was implemented, did not exist. However, I notice that there have been no backups since I installed this update - despite them being scheduled. @Jaxel / anyone --> does this system stop working while your forum is in development mode? Or is there a way to trouble shoot why they are not happening? If I manually run the cron job it works....

A little confused.

Thanks!

I updated to the latest release and get this same error.
[8WR] Database Backup 2.1.0.

My backups have stopped working and I cannot view the logs. If you are running this latest release, you may want to check your backups to see if they are running. The error is only thrown when you go into the Tools->Backup history and try to view the details.
 
I updated to the latest release and get this same error.
[8WR] Database Backup 2.1.0.

My backups have stopped working and I cannot view the logs. If you are running this latest release, you may want to check your backups to see if they are running. The error is only thrown when you go into the Tools->Backup history and try to view the details.

Check your cron jobs for the add-on. I noticed that mine seemed to have been undone somehow; so I picked the days and times I wanted again - so far it seems to be working.

Hope that helps!
 
Check your cron jobs for the add-on. I noticed that mine seemed to have been undone somehow; so I picked the days and times I wanted again - so far it seems to be working.

Hope that helps!

Do you still get the error when you try to view the backup history?
 
I'm not sure if this is right, but I changed the /src/addons/EWR/Backup/_data/cron.xml:

"dow":[4] to [-1] and rebuilt the addon and now set to do a daily backup instead of once every Thursday. Enabling debug mode wouldn't allow me to edit the cron job normally for some reason.

Also set the hours and minute values to 9:30 UTC.

Code:
<?xml version="1.0" encoding="utf-8"?>
<cron>
  <entry entry_id="ewrBackup" cron_class="EWR\Backup\Cron\Backup" cron_method="runBackup" active="1"><![CDATA[{"day_type":"dow","dow":[-1],"hours":[9],"minutes":[30]}]]></entry>
</cron>
 
On my primary server, the backups are bring created daily and retained for seven days as desired. However, the remote FTP seems to be randomly skipping days, sometimes several days.

These are the files created on my remote server by the remote FTP backup part of the add-on.
remoteftpbackups.webp

Any ideas what might be causing this?
 
Hi all,
Dug my way back through this thread and it's not mentioned, so i presume it's only me getting this....?

198148

Anyone have any clue as to how i can get around this please? And am i the only one getting this?? :)

Thanks
 
Hello,
For me Cron job is not working
I can run cron job manually and it's working as it should be
Also there is no Error in logs
 
Top Bottom