Main Menu

search

You are here

Drupal: Backup Site Files, Directories, and Database

[last updated: 2024-01-21]
Drupal home page
see below for Reference Links

for backup of local drupal 10 site ...
-----

NOTE: These instructions were developed for drupal 7 and are probably not quite correct for later versions.
NOTE: There are a lot of different ways to do things in Drupal. This method is just one way that works for me.
----------------------------------------------------

  • Backup Core Files:
    • Do this before any updates, upgrades, or module installations.
    • core files are everything in your root directory
    • find your root directory. See drupal: introduction

    • Open browser to your host site (my.bluehost.com)
      Log in:
          username: arduinoetal.net
          enter admin password
      Continue to account manager
    • under other CMS, select: arduinoetal.net
    • in Quick Links block to the right, select: File Manager
    • Double-click public_html
    • in right-hand pane, click top file (".well-known" directory)
      (click on directory folder icon)
    • Hold shift, press down-arrow to scroll to bottom to select all files
    • Click Compress (top menu bar), zip archive, Compress Files, close
    • This will create a [filename].zip file,
      where the filename is the name of the first file/folder in the list that you compressed.
    • In my system that file is the .well-known folder, and the zip file is ".well-known.zip"
      It will be placed in your directory listing, below the folders.
    • click to select it, then
      Click Download (top menu bar)
      Monitor progress until download completed successfully
    • Go to PC Downloads folder
      rename file to: yyyy-mm-dd_tttt_public_html.zip
    • move file to:
      workingFiles/Tech/websites/myWebsites/Arduinoetal.net/backup/7.73/public_html

    • Note: This backs up core files, including the "sites" folder, which (should) contain all your custom files.
        If you have specified a directory for special system files in Administer --> Site Configuration --> File System,
            then you must be sure to back it up separately, as it may be outside your root directory.

    -----------------------------------

  • Backup Database:
    • There are (as always) more than one way to do this. This is my preference:
      Create a zipped backup:

    • BH -> Helpful Links -> Advanced -> phpMyAdmin
    • Click: Databases (top menu bar)
      • Find the name of the database that your site is actually using:
        .../sites/default/settings.php

      Click the database you want to save (currently: drupald6c)

    • click Export, select Custom options,
      scroll to Output, Save Output to a File,
      select Compression: zipped
    • Scroll to bottom and click Export.
    • [dataBaseName].sql.zip will be sent to your Downloads folder
        (If you did not select the individual db, as mentioned above, the file sent to downloads may be:
              localhost.sql

      Rename to identify, move to your backup/archive folder
      -------------------------------------------------

    • Reference Links:

    .

    .

    .

    eof