Results 1 to 6 of 6

Thread: Most secure method for retrieving SQL backups

  1. #1
    Join Date
    Mar 2005

    Most secure method for retrieving SQL backups

    Looking for advice on this matter, and I didn't know any other forum category that would be better than this one.

    I'm looking for a good way for my web site client to regularly retrieve his own MySQL backups. My plan is to set a cron job to dump the contents of his database into a SQL text file, and set another job to either send him the SQL file or give him a link to retrieve it.

    But what is a secure way of doing that? Certainly I'm aware that the SQL file should not be stored within the web root directory. But whether it is mailed as an attachment or sent over HTTP after the client has authenticated with a password, neither of these transfer methods is secure. It will simply be plain text transmitted over the Internet. Short of SSL, is there anything to be done?

    It does occur to me that, since this particular site does not use SSL, any information in its database is being transmitted unsecure over HTTP at one time or another. So perhaps it's no more worrisome to transmit the SQL file? I'm looking for anyone's thoughts on the matter.

  2. #2
    Join Date
    Jan 2007
    If you wish to provide some sense of security without SSL, you could write an encrypted ZIP/GZIP file to provide to your client via a "server-side authenticated file-serving" script. You'll have to determine the best method of doing this for your particular server, of course (OS, web server, scripting languages, etc.). On a *nix system with the zip command you can supply a password to encrypt the file with on the command line using the -P option, (though it is recommended to encrypt interactively using the -e option).

    Bear in mind, this doesn't come anywhere near the security of just using SSL (which is pretty cheap for a basic cert). But, it offers a bit of security without having to find, author, or purchase any special encryption/decryption software.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  3. #3
    Join Date
    Mar 2005
    I will look into this. Thanks!

  4. #4
    Join Date
    Mar 2005
    I have been able to successfully use zip to compress the file, and the -e flag to encrypt it interactively. However, when I tried to use the -P flag you mentioned, it was not recognized. Can you give me an example of how to use password protection in the command, rather than interactively? (I know it's less secure, but right now I'm just trying to put this in an .sh file I can run as a cron job, and I'll worry about improving it later.)

  5. #5
    Join Date
    Jan 2007
    Sure--this may vary based on OS though. On CentOS, the following command will place test.file into a ZIP archive protected with password default:

    zip -P default test.zip test.file
    You'll probably want to check the manpage for details on the version of ZIP that ships with your particular OS.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  6. #6
    Join Date
    Mar 2005
    That works great. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.18910 seconds
  • Memory Usage 2,888KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates