[Cialug] Coding Horror

David Champion dave at dchamp.net
Mon Dec 14 14:03:54 CST 2009


It's not hard at all to backup mysql:

mysqldump -u my-username --password my-password database-name > 
database-name.dump

or, use --all-databases in place of database-name.

You can cron it to run daily, put a date stamp in the dump file name... 
tada, you have a backup.

Please note that if you're including the user/pass in a script, then you 
should set the permissions so not everybody can read the file.

-dc

Matt Stanton wrote:
> I can't imagine not having a local copy of any website I'm working on 
> handy...  Even with my web server in the next room over, I've got a copy 
> local to my desktop.  Luckily, I'm not to the point yet where I have 
> gone to saving all the content in a database (sometimes it helps not to 
> know SQL?).  Our gaming clan uses vBulletin, which is a forum package 
> that saves everything (including images) in a MySQL database, plus all 
> of our admin, stats, and ban data is saved to a MySQL database, so 
> knowing how to dump an SQL database to a file backup is pretty important 
> (I really hope our database guy does this, come to think of it).  I 
> believe most cpanel-style web host control panels allow you to click a 
> button to download a backup of all your databases that are included with 
> the hosting of your website, but that's just a guess since I've never 
> had access to any of those panels before.  The TCAdmin game server 
> control panel would allow up to download backups of the database that 
> saved all the information bout the different servers that were being 
> administered by it, but we no longer feel the need to pay for TCAdmin 
> anymore.
>
> Josh More wrote:
>   
>> I believe that the issue here is not keeping copies of code (which all
>> developers should be good at), but keeping copies of content that has
>> been generated over the years.  Even among system administrators, I know
>> very few people who are good at that.
>>
>> Even I only backup my various sites (web site, blog, wiki, livejournal,
>> twitter, facebook, linkedin, super secret mailing lists) on a monthly
>> basis... and I'm the only one I know who regularly backs up third party
>> sites.  I know I should do better, but really, it's just not as much of
>> a priority as generating new content.
>>
>>
>>
>>
>>
>> -Josh More, RHCE, CISSP, NCLP, GIAC 
>>  morej at alliancetechnologies.net 
>>  515-245-7701
>>
>>   
>>     
>>>>> Jeff Davis <me at digitaljeff.com> 12/13/09 10:37 PM >>>
>>>>>         
>>>>>           
>> Ken, I agree with you for the most part.
>> The longer you are in the IT field as either a programmer/developer or
>> sysadmin,
>> I think you tend to develop some of those cross-trained skills.   Even
>> then you
>> will always be a little better at one, depending on what your talent
>> leans toward.
>>
>> I would expect a more green programmer to maybe not have learned to keep
>> their own
>> copy of the code, but someone who has been coding for several years
>> should know better.
>> That obviously will depend on your environment somewhat.  If you work
>> for a
>> mid to large company your job might be compartmentalized enough that you
>> don't even have the opportunity (on the job) to expand into some of
>> those areas. 
>> Many of those folks will only learn those other skills if they're doing
>> hobby IT or freelance work.
>>
>> -Jeff
>>
>>
>> kristau wrote:
>>   
>>     
>>> IMHO, developers don't usually have very good system administration
>>> skills and systems administrators don't usually have very good
>>> software development skills. To be successful you either need both
>>> skill sets in one person or people with complimentary skill sets
>>> working together.
>>>
>>>   
>>>     
>>>       
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>>   
>>     
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
>   



More information about the Cialug mailing list