keeping in mind the quick and dirty ethics, no boring explanations, here’s my approach on how to backup wordpress’ mysql database. it’s useful to do it before upgrades, long holidays in southamerica, dull sundays, political p.o.v. modifications and because it is a healthy habit.
this is my script (if you carefully google it, you will find out that it is not an original idea)
#!/bin/sh
DBBDATE=`date +%Y-%m-%d_%H.%M.%S`
DB_USER=user
DB_ACCESS=xxxxxxxx #password
DB_NAME=wpdatabse #how you named your wp database
BLOG=TODO
mysqldump --opt -u $DB_USER -p$DB_ACCESS $DB_NAME > database_$BLOG-at-$DBBDATE.sql
#un comment the following line to make a local copy
#cp database_$BLOG-at-$DBBDATE.sql /mnt/backups
#un comment the following line to make a remote copy
#scp -P 1234 database_$BLOG-at-$DBBDATE.sql user@remote.unit.com:/mnt/backups/
Stuff written in red MUST be changed, excepting only wise people that have a FQDN like “remote.unit.com” and a partition called ‘/mnt/backups/’ or so.
Share on Facebook
- read the previous post
- install pptp-utils
- su [troll] (not sudo) [/troll]
pptpsetup --create --server IP.OF.VPN.SERVER --username\\
foo --password BarFoObar --encrypt --start
route -n
- set up routes if needed
route add -net 192.168.0.0/24 ppp0
that was an easy one.
Any comments?
Share on Facebook
A few months ago (13?) I made an upgrade and ever since I had the network icon with an X over it.
After a few moths googling I give up.
This morning I was googling for pptp help and (logically) I found the answer to my previous question:
[troll]
use vi to edit the file
[/troll]
/etc/NetworkManager/nm-system-settings.conf
change:
[ifupdown]
managed=false
to:
[ifupdown]
managed=true
Then gracefully kill all nm-system-settings instances:
killall nm-system-settings
You think that was too easy?
Me too.
Share on Facebook
import zipfile
this post was intended to be giving an example of the zipfile module in python.
I finally realized that it was so annoyingly complicated as an example, that i’ve decided to write about tarball creation. This subject will be posted soon, during the week.
This post will remain incomplete for a while, sorry.
Share on Facebook