We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13094
    • 58 Posts
    hi there,

    is there a possibility to rename the backup sql file?
    actually it is only the date and ’_database_backup.sql’, but what I need is at least the site’s name or the domain I do the backup from, ’cause I’ve differnt MODx’ on different servers/hosters for different customers.

    thanks for your feedback,
    rolf
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can name it anything you want once you download it.

      It won’t be a big problem if you keep all of your domain activity in separate folders. I have a folder for each domain, and a subfolder "backups" in each domain’s folder, so the .sql dump’s filename really doesn’t matter to me.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 13094
        • 58 Posts
        thanks for your reply Susan,
        of course you’re right. but - hey! - why don’t let the software do the work for me?

        I thought there is a more elegant solution than ’hacking’ the bkmanager.static.php’ content-disposition filename.

        regards,
        rolf


        UPDATE:
        hacking is believing... this works fine for me:
        header(’Content-Disposition: attachment; filename=’.date("Y-m-d").’_’.$_SERVER[’HTTP_HOST’].’_modx_db_backup.sql’);

        BUT: of course this is worse.
        and, while downloading, I recognize, that I want to download all the files, too. so I wrote a little script that scans the directories and zip’ed the files together.

        to get this clean, and to enlight me wink ’cause I never wrote a backend-thingy for MODx:
        should this go into a module or a snippet to show an extra form in the backup page (a=93) to allow a user to select file-download? or should this stay closed?

        my idea is a complete package to backup/move a hole system.

        cheers,
        rolf
          • 28042 ☆ A M B ☆
          • 24,524 Posts
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 13094
            • 58 Posts
            ohh, cute.
            thanks. shouldn’t that be a part of the core functionality, like e.g. Typo3’s t3d tarballs?

            I’ll give that a try, thanks

            rolf