We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45366
    • 45 Posts
    I've not had to do it before but I just want to back up my website. I'm thinking in terms of 'disk image', so just back up everything so that if something goes wrong in future I have a base line to return to (which could be done regularly)

    Here are the options (as far as I can see)



    I've heard of FTP servers but have never used one so I'm guessing that options not for me, though is this something that I should set up and use?

    The other two options are Home Directory, I'm guessing that's refering to the directory of the site rather than my computer. And the other is Secure Copy, I don't know what that is (An encrypted version?)

    So basically I just want to back it all up just in case ! Happy to try the FTP if that's best, any help appreciated.
      • 42887
      • 19 Posts
      Well from the picture above, Home Directory is a good option if you don't have FTP. And I've heard/experienced issues with backing up with FTP. Generate the backup with Home Directory option and you'll get all the contents of your site, from the root forward. Here is a direct link if you want to read more about it: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/BackUps#Create%20a%20Full%20Backup

      On a side note since you asked: If you're not using an FTP server to transfer files, in my personal opinion, I highly recommend it. FileZilla is a great open source FTP and has loads of benefits. https://filezilla-project.org/ This will allow you to open and edit files locally, then just save, confirm, and the file is updated on your server. I personally wouldn't recommend upgrading/installing MODX via FTP (in fact, I think MODX mentions this is their docs...something to do with possible corruption and missed files) but for quickly updating/managing files, it's great.

      Hope you find this info helpful! Cheers.
        • 25803 ☆ A M B ☆
        • 721 Posts
        Home Directory should be fine but I usually just go into the CPanel File Manager, do directly to where MODX is, delete the files in core/cache, and then just use the File Manager's compress function to create an archive (by selecting all the files and folder first of course).
          • 3749
          • 24,544 Posts
          Same here, though SiteCheck now offers a quick way to back up the entire DB from within MODX (if you can get the command right). http://bobsguides.com/sitecheck-promo.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 22840
            • 1,572 Posts
            To be honest, although the suggestions are good you'd be far better off using https://www.codeguard.com/ if you can afford $5 a month, this will backup the files and database every 24 hours automatically and you can access them whenever you want and just click restore for either the database or files, no need to knowing FTP or how to restore a database through PhpMyAdmin.

            It will also take away the need for you to backup the site yourself.

            It's also worth noting, if you do cpanel backups that stores them on the same server your main site is on, so if something happens to the hardware on that you may also loose the backups.
              • 25803 ☆ A M B ☆
              • 721 Posts
              Ideally a hosting plan should do proper and multiple backups to different locations. I always make a local copy of the backups I make on the server. Of course these days I try to always host on MODX Cloud but some clients need to host other systems and email and it's not quite there yet for that.

              CodeGuard looks cool and is probably cheaper than an "enhanced" hosting plan with backups.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Another easy way to back up your site is to install and run Vapor. Vapor creates an installable package, so to restore a damaged site all you do is install a new MODX, then install the Vapor package.

                Using the HTML method to run Vapor can be a problem if the site gets really big, or you have a lot of large images or videos since the PHP could time out, so SSH access for using the command line to run Vapor would be necessary on sites like that.

                I've also successfully used Evo's BkupMODx http://modx.com/extras/package/bkupmodx - all it needs to port it to Revo is to edit the code to find Revo's config.inc.php file for backing up the database (line 36 of the model_config.inc.php file). It can run stand-alone, again either from the browser or from the command line if the site is too big. You can configure it to skip large directories if you have lots of images or videos. I protect its config file with an .htaccess deny rule.
                  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
                  • 45366
                  • 45 Posts
                  Hi, thanks for all the responses smiley

                  Modx125 :

                  I can back up to Home Directory, the only concern is

                  A : If something happened then I'm guessing that this would get ruined with it!
                  B : If the site's ever over half full I won't be able to fit the backup in the home directory.

                  And I've heard/experienced issues with backing up with FTP

                  What was the issue?

                  If you're not using an FTP server to transfer files, in my personal opinion, I highly recommend it

                  Yes I'd like to use FTP - or at least I'd like to learn how to use it. Is it very hard? Would that mean that I could just upload gallery's / images by drag / dropping in the GUI?

                  I personally wouldn't recommend upgrading/installing MODX via FTP

                  Cool


                  Quote from: rx2 at Feb 27, 2014, 04:09 PM
                  Home Directory should be fine but I usually just go into the CPanel File Manager, do directly to where MODX is, delete the files in core/cache, and then just use the File Manager's compress function to create an archive (by selecting all the files and folder first of course).

                  I logged into the CPanel but I'm not too sure where ModX is actually located in there? Couldn't really follow along with that sad

                  Quote from: paulp at Feb 27, 2014, 05:46 PM
                  you'd be far better off using https://www.codeguard.com/ if you can afford $5 a month

                  Cheers Paul - hadn't heard of that before. It would be nice to 'learn' how to use FTP to be honest, though I'll mention this service and see whether it's something they'd want to use, it sounds good smiley


                  Quote from: sottwell at Feb 27, 2014, 11:35 PM
                  Another easy way to back up your site is to install and run Vapor.

                  Using the HTML method to run Vapor can be a problem if the site gets really big

                  So is Vapor kind of a 'disc image' for the site?

                  How big would too big for the HTML method probably be?

                  Some that (editing config files and stuff) sounds like it'd be a bit tricky for me, I'd probably do more harm than good wink
                    • 1343 ☆ A M B ☆
                    • 2,213 Posts
                    Everyone has their own recommendations when it comes to backups, and it shouldn't be a surprise I have a few suggestions as well.

                    @Paulp - Relying on a third party to store your backups can be convenient, but you shouldn't rely on them alone. What happens if your server crashes while they are performing maintenance? What if you forget to renew, or they get hacked? You should always have your own backups and know how to restore them. Additionally a backup is only good if you can restore it so don't forget to test them often! (...tape drive backups are evil...)

                    You are correct, storing the backup on the same server will not offer you any protection. You need to save them to a remote location or have said location automatically/regularly fetch them.

                    @rx2 - Excellent point! Your host should maintain multiple backups to a remote location. In some cases you might find multiple backups to multiple remote locations, however for shared hosting that is unlikely based on my experience. In addition to those remote backups you should have easy access to them. In some cases hosts will offer built in restore scripts, direct access to the backups, or some combination of the two.

                    Getting back to the subject of the backups... The problem with FTP access is corruption, and lots of it for that matter. It's perhaps one of the worst methods to access a server in my book. In addition to transmitting passwords as plain text it's not uncommon for the files transmitted to be corrupt. It's generally recommended to use SFTP or an alternative connection method (SCP, RSYNC, RDIFF, SSHD, etc) which will generally offer a more secure connection and less corruption. If FTP wasn't so common I would be extremely inclined to disable it on every server, I already shift SSH/SFTP to a different port for added security.

                    Personally I recommend running full cPanel backups as shown in your screenshot. They package up everything (files, databases, emails, etc), so if you need to restore your site quickly providing - that file is the winner. It also allows you to restore to any host offering cPanel should you need a more drastic measure.

                    If you are looking for MODX specific backups, then Vapor is an option you can use. I would start with what you want to backup, and then look into the best method to accomplish that goal.

                      Patrick | Server Wrangler
                      About Me: Website | Tweets |  MODX Hosting
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Vapor is a package builder for the whole site. It creates an ordinary Revo package.zip file out of the entire site, puts it in the core/packages directory so you can download it and put it in a new installation's core/packages directory, and install it from local like any other package.

                      As far as "how big is too big", that would completely depend on your server configuration... PHP timeout, memory limits, as well as web server configuration settings.
                        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