The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Backup userspice files & table
#31
Will try this now to see if I can get it to work on cP.

I'm thinking the error about file name length was only due to it backing up the backup folder which we are trying to solve, because as soon as I stopped backing up that folder the error was gone...will let you know my result of this.
  Reply
#32
Unfortunately, if I followed your steps right...not working on this end... Sad
  Reply
#33
@Brandin yeh i get gateway timeout on remote which i got originally on mudmins mod, so defo infinite loop on backups, looks like it will have to be dealt with on either the recurse_copy() function or the backupObjects() function as its happening before copying & zipping up. files and directories are held in array as $backupItems
  Reply
#34
Ive CRACKED it ! i THINK ? lol

right, I've edited the gist, mainly backup_util.php and admin_backup.php, I've tested on localhost (mamp pro) and remote shared linux & cpanel server all working perfect and quicker than expected.

https://gist.github.com/Firestorm-Graphi...48cb0e01d8

just replace as is
  Reply
#35
I don't know what you did...but you did it. THANK YOU! This is awesome!!!
  Reply
#36
awesome thats great news , after jumping in deep i really didn't have to do much, prepending the folder with @ turned out not to be necessary but i left as is, i changed a few lines in the recurse_copy() function in backup_util.php.

added:

line 65 ish:
Code:
global $settings;
line 66 ish:
Code:
$dest = '@'.rtrim($settings->backup_dest, '/');

added permissions to @mkdir

then changed:

line 70:
Code:
if (( $file != '.' ) && ( $file != '..')) {

to:

Code:
if (( $file != '.' ) && ( $file != '..') && ($file != $dest)) {

thats it really, now for backup restore, do we do as backup script reverse engineered or do we just restore tables ?
  Reply
#37
That's a whole other playground... Wink
  Reply
#38
That is very good news. I'll be rolling this in. THANK YOU!
  Reply
#39
This is rolled out to 4.2.10 and 4.3 Thanks for this. I'm definitely interested in restore. I think it will be pretty tricky though.
  Reply
#40
awesome, yeh I've put restore on back burner until ive finished database driven menu's and done extensions, any other changes in the latest update ?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)