Ispconfig3.05 backups

Discussion in 'Installation/Configuration' started by zapyahoo, Mar 20, 2013.

  1. zapyahoo

    zapyahoo New Member

    Was trying this feature, if it works would be great, right now I'm running separate crons.

    In CP system > Server Config > my multi server webserver > Backups
    Selected a different backup directory, different hard drive
    Backup Mode: Backup web files owned by web user as zip

    1. The web user directory gets created in above drive but only the database gz shows up. No zip file or website files.
    Because I followed the multi-server setup, don't recall any mention to unzip package, checking my server... this package is not installed.
    First question, guess I need to install unzip?
    any other packages to have the backups running properly?

    2. Inside the /var/www/clients/client* the backup directory was also created but with no files. Should have the symlink pointing to the CP backups drive and dir or zip file. Could it be because I'm missing the zip file?

    3. Would like to force 5 days of backups with daily frequency to all users. But after setting 5 days, the user client can change the setting in the website tab/backup to 10 days and other frequencies (overriding my setting)... Is this how it should be? Is there a way for force 5 days without the possibility of client override?

    4. To finish, last question. Upon new website creation, is there a way to auto enable the backups with fixed daily frequency and 5 copies? for all future websites?

    Thanks
     
  2. till

    till Super Moderator

    1) Install zip and unzip.
    2) Thats all correct, the directory must be empty as it is not used to store backups. This directory is only used to provide backup downloads after requestng them in ispconfig.
    3) Yes. But it is planned to add client limits for backups in future.
    4) No.
     
  3. almere

    almere HowtoForge Supporter

    3) You should delete "Backup" tab from web site edit. Something, like:
    File: /usr/local/ispconfig/interface/web/sites/templates/web_domain_backup.htm
    Change everuthing to:
    Code:
    
    <h2><tmpl_var name="list_head_txt"></h2>
    <p><tmpl_var name="list_desc_txt"></p>
    
    <div class="panel panel_web_domain">
    
        <div class="pnl_formsarea">
        
        	<?php if(strip_tags($_SESSION['s']['user']['username']) == 'admin'){ ?>
            <fieldset class="inlineLabels"><legend>Backup</legend>
                <div class="ctrlHolder">
                    <label for="backup_interval">{tmpl_var name='backup_interval_txt'}</label>
                    <select name="backup_interval" id="backup_interval" class="selectInput">
                        {tmpl_var name='backup_interval'}
                    </select>
                </div>
                <div class="ctrlHolder">
                    <label for="backup_copies">{tmpl_var name='backup_copies_txt'}</label>
                    <select name="backup_copies" id="backup_copies" class="selectInput">
                        {tmpl_var name='backup_copies'}
                    </select>
                </div>
            </fieldset>
            <?php } ?>
            {tmpl_var name='backup_records'}
    
            <input type="hidden" name="id" value="{tmpl_var name='id'}">
    
            <div class="buttonHolder buttons">
                <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
                <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            </div>
        </div>
    
    </div>
    
    


    4) Yes, it is. You should change the standard value the file and mysql.
    File: /usr/local/ispconfig/interface/web/sites/form/web_domain.tform.php
    Find the line:
    Code:
    'backup_copies' => array (
    And change the 'default' value for this array to 5.
    Code:
    'default'	=> '5',
    Open phpMyAdmin
    Table: 'web_domain' , klick to "Structure" and change the default value in the line "backup_copies" to 5.



    Something like that. But first make the backup of all files and mysql.
    And you should know: if you are not "friends" with php and ispconfig , you should be really careful AND you are doing it for your own risk.


    P.S. Sorry, Till :(
     
  4. till

    till Super Moderator

    Its always possible to change the code to achieve a goal. So if the question is if ispconfig manages samba, runs on windwes and if it can switch on your coffee maker over wlan, your answer is yes and mine is no :) If you propose code changes to a user you should also tell him that he either cant update in future or he will have to redo all changes in the code as not everyone is a developer and is aware of this fact.
     
  5. almere

    almere HowtoForge Supporter

    You are right... :(
    Well... I installed ISPConfig 3.0.5 RC1 and changed almost everything for my need. Now i have nginx and apache works together, changed firewall, changed API functions. But it was only 2 hours to merge changes for me with special soft :D
     
  6. zapyahoo

    zapyahoo New Member

    @almere... thanks for the input. Very comfortable with mysql and php. Also did some core hacks in 3.0.4 but decided to leave that alone since @till mentions they obviously get lost upon upgrade.

    And upgrade is something we must do :cool:

    Thanks to both, and will report back maybe tomorrow with news on my zip backups :), just installed the packages and guess the cron will run later today during my beauty ZZZzzzz
     
  7. almere

    almere HowtoForge Supporter

    It will be greate... :D
     
  8. zapyahoo

    zapyahoo New Member

    Ok, got zip file in main backup directory.
    symlink not showing in web costumer directory and or inside control panel. So I'm thinking, could this be normal because of ispconfig cron setup?
    Last night cron created the zip... tonight cron will create another zip + symlink of first zip?
     
  9. almere

    almere HowtoForge Supporter

    You will not see any symlinks in the web costumer directory. You can find all backups at "Backups" tab while editing your site.
     
  10. zapyahoo

    zapyahoo New Member

    was under the impression that a symlink would be created inside /var/www/clients/clientx/webx/backup/x.zip

    Any case, control panel does not show zip file either. Could be normal ispconfig cron? Maybe till can share some wisdom here.
     
  11. zapyahoo

    zapyahoo New Member

    5 days later still no backups inside ispconfig. All backups are being done correctly in the master backup folders, files permissions seem to be correct.

    Could I still be missing a dependency besides zip and unzip?

    Thanks
     
  12. zapyahoo

    zapyahoo New Member

    Still no backups in control panel.
    Had sometime to check the ispconfig3 logs in control panel server and webserver. Cant find any errors regarding backups.

    Checked the databases in both servers, table web_backup.
    Webserver shows the backups.
    Control Panel does not show any backups.

    Sounds like a bug in multiserver setup.

    So I'm thinking if control panel is pulling the data only from it's table? or
    Should the control panel web_backup database be populated with same info as webserver?

    Till can you give a hand with the above questions.
     
  13. till

    till Super Moderator

    The web backups should work at least they work here on my systems. The database backups do not work if the database is not on the same server then the web server at the moment, there is a pending bugreport for that.
     
  14. zapyahoo

    zapyahoo New Member

    Not on my end, not even the web backups :confused:
    I was checking the mysql databases in control panel server and web server.
    Everything seems to be ok in the web server backup table, at least all backups are there.

    The master control panel server as this table empty.
    Should it be like this? or should this table be a copy of the web server with all entries?
     
  15. till

    till Super Moderator

    Did you chose to update permissions in master database while you updated the slaves? If not, then your slaves will not be able to add the backups in the master server.
     
  16. zapyahoo

    zapyahoo New Member

    Thanks for the answer nd sorry for all the questions.
    As you probably read in 3.0.5.2 release thread I was pondering that would be the issue... hence my question there, that you already answered.

    That's probably what's causing all my headaches. I already try to re-run the upgrade command in the slaves... but it does not work, I already have the most current version.
    Any other command.php I can run to reconfigure the installation of 3.0.5.2 in my slaves? or should I wait for next release and update the slaves databases?
     
  17. till

    till Super Moderator

    To rerun the update on the slaves, use the manual update instructions which are described at the end of each release notes document.
     
  18. zapyahoo

    zapyahoo New Member

    ok, Did that in all slaves.

    Checked and compared the databases of master server and web slave server, there where a few differences between the servers related to the tables web_database and web_database_user
    - mainly server ID field for webserver, in my case webserver is id4. The id shows up correctly in slave web server but not in the master (it was showing either 0 or ID1)
    - also permissions were different, some ru other riud... changed them all to riud
    - the database_user_prefix was showing # for some older first databases... instead of correct prefix

    ???? all this is weird :confused: since it's the first time I have ever edited the database manually. Took me a few hours to correct all this and have proper info exactly the same in both servers.


    Regarding the backups... they are being done correctly in the slave server and stored in /var/backup .... also the slave server under the database table web_backup shows all backups, past and present, web and mysql.

    The master server is not syncing this table. The table is totally empty in the master server. To test, I manually created 2 rows exactly the same as in the webserver. And voilá... web zip and sql show up in the control panel under backups for the selected website. To test further I clicked download for both files (web zip and mysql), a few minutes later both files successfully showed up inside the website backup directory. :eek:

    In ubuntu 12.04 64x mysql database table for web_backup does not sync, web or mysql.
     
    Last edited: Apr 4, 2013
  19. zapyahoo

    zapyahoo New Member

    *****UPDATE*****

    Backup cron run last night.
    This morning upon checking ispconfig control panel, all websites had the web and mysql backups.
    Happy camper :D, guess i did good yesterday cleaning the databases manually. Hope the adventure helps someone.
     

Share This Page