The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Backup userspice files & table - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28) +--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29) +--- Thread: Backup userspice files & table (/showthread.php?tid=622) |
Backup userspice files & table - Brandin - 07-05-2017 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. Backup userspice files & table - Brandin - 07-05-2017 Unfortunately, if I followed your steps right...not working on this end... Backup userspice files & table - firestorm - 07-06-2017 @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 Backup userspice files & table - firestorm - 07-06-2017 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-Graphics/23862bf5a7111aea675ab748cb0e01d8 just replace as is Backup userspice files & table - Brandin - 07-06-2017 I don't know what you did...but you did it. THANK YOU! This is awesome!!! Backup userspice files & table - firestorm - 07-06-2017 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; 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 ? Backup userspice files & table - Brandin - 07-06-2017 That's a whole other playground... Backup userspice files & table - mudmin - 07-09-2017 That is very good news. I'll be rolling this in. THANK YOU! Backup userspice files & table - mudmin - 08-14-2017 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. Backup userspice files & table - firestorm - 08-14-2017 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 ? |