We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    I do not uinderstand piont 2 in the setup:
    2. change $modx_backup_dir in /assets/modules/modbak/download.php file, note download.php requires full path name


    I do not have a directory called modbak or is this only for 0.9.2.1 I am running 0.9.1 for this website.

    maybe you could make a install.txt
    step by step configuration

    and another feature that I would like is the posibility to send the file tru ftp to my home but that would need maybe a ftpclient of some sort. I have a ftpserver running would be great to have an option to store and send the file to ftpserver.

    Dimmy
      follow me on twitter: @dimmy01
      • 32982
      • 674 Posts
      you dont need enything, only put the snipet and call in a very usage page and create a chmod 777 backup called directory. i dont undertand your quote
      hi
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 7455
        • 2,204 Posts
        Quote from: xyzvisual at May 30, 2006, 05:21 PM

        you dont need enything, only put the snipet and call in a very usage page and create a chmod 777 backup called directory. i dont undertand your quote
        hi

        when you take alook at your own snippet code it says that i need to do 2 steps the one above is step 2

        when i copy the code into modx then i get a pars error that my root folder is not writable. I changed the $modx_backup_dir to say /Backup and made a folder in my root called Backup with 777 as chmod but still I get a pars error that my root folder (httpdocs) is not writable but I can not find an other setting where I can set the backup directory.

        this is what I have now for my settings:
        $WebGroup = 'admin';
        $number_of_backups = 3; 
        if($modx->isMemberOfWebGroup($WebGroup) || $_SESSION['usertype']=="manager"){
        $modx_root_dir =$modx->config['base_path'];
        $mods_path = $modx->config['base_path'] . "assets/modules/";
        $modx_backup_dir = $modx->config['base_path'] .'Backup/';
        $modx_backup_dir2 = $modx->config['base_path'];
        $archive_suffix = mktime(0, 0, 0, date("m"), date("d"), date("y"));
        $archive_file = $modx_backup_dir.$archive_suffix.'_website_backup.zip';
        $database_filename = $archive_suffix.'_database_backup.sql';
        if (file_exists($archive_file)){}else{     
         /**
        *  Description:
        *  Backup modx files and compress into .zip for easy download
        *  @author Robin Stemp <[email protected]>
        *  @version 0.8 13-Feb-06  Added log tables, excluding log data.
        *                          Added check for .htaccess file, backup directory.
        *                          Added MODx Manager theme header (header.inc.php)
        *                          More testing done.
        *  @version 0.5 11-Feb-2006, not heavily tested though
        *
        *  Setup:
        *     1. change $modx_backup_dir to directory for zip archives and make sure read/write permission is set for directory
        *     2. change $modx_backup_dir in /assets/modules/modbak/download.php file, note download.php requires full path name
        *         ie /home/username/public_html/_backup/
        

        I added the setup lines to show you what I mean

        I have put the snippet in my home page template

          follow me on twitter: @dimmy01
          • 32982
          • 674 Posts
          realy i dont know whats happend it could be modx is in a subdirectory and you need to make 777 folder backup into this or could be a server isue because for me works very well and could be the upercase you put in the snippet for the backup dont touch eny thing of the snipett and create the directory in lowercase
          hi
            Jabiertxof (formerly XYZVISUAL)
            My bussines: http://marker.es
            https://www.youtube.com/user/jabiertxof/videos
            • 7455
            • 2,204 Posts
            ok this is the error I get when i change nothing and have a directory called backup with chmod 777 in my root folder:

            « MODx Parse Error »
            MODx encountered the following error while attempting to parse the requested resource: 
            « PHP Parse Error » 
              
            PHP error debug 
              Error:  fopen(/home/httpd/vhosts/1-vision.nl/httpdocs/1149026400_database_backup.sql): failed to open stream: Permission denied   
              Error type/ Nr.:  Warning - 2   
              File:  /home/httpd/vhosts/1-vision.nl/httpdocs/manager/includes/document.parser.class.inc.php(691) : eval()'d code   
              Line:  359   
              
            Parser timing 
              MySQL:  0.0032 s s (4 Requests) 
              PHP:  1.2164 s s   
              Total:  1.2196 s s   
            


            looks like the SQLBackup wants to be written into the root folder instead of the /backup folder.
              follow me on twitter: @dimmy01
              • 32982
              • 674 Posts
              realy it is because in my server works ok but test if all works changing this line
              $modx_backup_dir2 = $modx->config[’base_path’]’;
              to
              $modx_backup_dir2 = $modx->config[’base_path’] .’another_directory_in_the_root_folder_whith_777_permissions_called_enything_except_the_word_backup/’;
              and tell me if all works ok
              hi
                Jabiertxof (formerly XYZVISUAL)
                My bussines: http://marker.es
                https://www.youtube.com/user/jabiertxof/videos
                • 7455
                • 2,204 Posts
                Getting another error now:

                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource: 
                « PHP Parse Error » 
                  
                PHP error debug 
                  Error:  mysql_query(): 7 is not a valid MySQL-Link resource   
                  Error type/ Nr.:  Warning - 2   
                  File:  /home/httpd/vhosts/1-vision.nl/httpdocs/manager/includes/extenders/dbapi.mysql.class.inc.php   
                  Line:  93   
                  Line 93 source:  if(!$result = @mysql_query($sql, $this->conn)) {    
                  
                Parser timing 
                  MySQL:  0.0033 s s (4 Requests) 
                  PHP:  0.5439 s s   
                  Total:  0.5471 s s 
                


                there was a sql backup made in /sqlbackup`and a tmpbackup.zip in /backup but the zip was 0 bytes



                These are my settings:
                $WebGroup = 'admin';
                $number_of_backups = 3; 
                if($modx->isMemberOfWebGroup($WebGroup) || $_SESSION['usertype']=="manager"){
                $modx_root_dir =$modx->config['base_path'];
                $mods_path = $modx->config['base_path'] . "assets/modules/";
                $modx_backup_dir = $modx->config['base_path'] .'backup/';
                $modx_backup_dir2 = $modx->config['base_path'].'sqlbackup/';
                $archive_suffix = mktime(0, 0, 0, date("m"), date("d"), date("y"));
                $archive_file = $modx_backup_dir.$archive_suffix.'_website_backup.zip';
                $database_filename = $archive_suffix.'_database_backup.sql';


                Dimmy
                  follow me on twitter: @dimmy01
                  • 32982
                  • 674 Posts
                  i dont know whats the problem but in the mysql backup new created folder dont put the world backup
                  could be it if not i dont know. To me works all well could be the server or the permissions in mysql or files of your server. Test the original Backup module to test if works.
                  hi another cuestion what going on whith the moomenu you realy do all well, only put the snipet posted again and it i think work.
                    Jabiertxof (formerly XYZVISUAL)
                    My bussines: http://marker.es
                    https://www.youtube.com/user/jabiertxof/videos
                    • 7455
                    • 2,204 Posts
                    I am still struggling with this backup tool
                    and I realy need this.

                    It creates a sql backup in the root of my site (i needed to set permisions to 776 to get it to work) it also creates a tmpbackup.zip in my /backupfolder but then it stops it does not show me the page the snippet is insert into and when i do a reload of that page the whole backup is starting over again.

                    If I gave you acces to my test site to test this snippet would you like to help me getting this great snippet working?
                    if it works good that it would be ven vetter to have this kind of backup in the core systemI think.
                      follow me on twitter: @dimmy01
                      • 32982
                      • 674 Posts
                      the final backup is diferent than tmpbackup (this is a temporary file and when end backup disapaire) you only need to call the snippet in the homepage, but i think is a problem whith permissions and dont make the final bakup what is necesary to not start again the bakup you put the root folder backup 777 ? this could be the problem.
                        Jabiertxof (formerly XYZVISUAL)
                        My bussines: http://marker.es
                        https://www.youtube.com/user/jabiertxof/videos