Changes between Version 2 and Version 3 of faq/member-backup


Ignore:
Timestamp:
May 7, 2011, 5:00:25 PM (14 years ago)
Author:
anawillem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • faq/member-backup

    v2 v3  
    11= How can I backup my own data? =
     2
     3== PHPMyAdmin ==
     4
     5This is the easiest way if you are less familiar with working on a command line.
     6
     71. First you will want to know what server your website is on.  You find that out by going to https://members.mayfirst.org and logging into your member's control panel.  Once you are in, you will see the name of your server on the upper(ish) right hand part of the page:
     8
     9{{{
     10Your primary host is: julia.mayfirst.org (209.234.249.204)
     11}}}
     12
     131. Next you'll want to find out what your database password is.  You'll do this by logging onto your site, navigating to the 'web/sites/default' folder, and downloading or reading the 'settings.php' file.  That file will have a line with your database username and password in it in the following format:
     14
     15{{{
     16$db_url = 'mysqli://[username]:[password]@localhost/[database]';
     17$db_prefix = '';
     18}}}
     19
     201. Using the username and password in the settings.php file, navigate to the url of your primary host but add a '/phpmyadmin' to the end of that url and login:
     21
     22{{{
     23https://julia.mayfirst.org/phpmyadmin
     24}}}
     25
     261. Once you are in there will be the name of your database in the upper left-hand column.  Click on your database name (not the one that says 'information_schema').
     27
     281. In the main part of the page, you will see a series of tabs at the top of the page, click the tab that says 'Export'.
     29
     301. In the page you are taken to, all of your database tables will be selected by default (the box on the upper lefthand corner of that page).  If you have a LARGE database and you want to minimise the risk of taking up too much memory, deselect the database tables that have 'cache' (IE: cache_views, cache_blocks, etc) and the 'sessions' table.
     31
     321. The default settings in phpmyadmin will work for a basic backup.  Navigate to the bottom of the page, CHECK the 'Save as file' button and choose 'gzipped' as your compression.  Name the file something like 'mysite_020111.backup' (the numbers being a 6 digit date without punctuation).  The program will add a '.sql' to the end of your file, and save it you your computer in the default download folder when you click save.
     33
     34If your browser times out during this operation or you experience other issues, please submit a support ticket to Mayfirst People link and us know.
     35
     36
     37== COMMAND LINE ==
    238
    339I created a very simple script to backup my files and database from the command line.
     
    1046}}}
    1147
    12 Change the info inside the bracket for your own site. Save file as "backup.sh". SSH into your server and create a new directory called "backups". Put the script in that directory and make it executable (chmod 755 backup.sh).
     48Copy and paste this text into a program like notepad, textedit or wordpad.  Change the info inside the bracket [] for your own site. Save file as "backup.sh". SSH into your server and create a new directory called "backups". Put the script in that directory and make it executable (chmod 755 backup.sh).
    1349
    1450The first line (after #!/bin/bash) dumps a dated copy of your database right into your web directory (maybe not the best practice but it gets deleted very fast).