Tag Archives: backup

Backing up Your Delicious Bookmarks

New technologies can offer a lot, but the mortal sin of users is not backing up. You should backup everything important to 2 places, somewhere local (within your own home network), and somewhere not local (Amazon S3, Mozy, your parent’s house).

Here is another trick for backing up. This script backups Delicious bookmarks. Delicious is a social bookmarking site. Almost no one backs up their local bookmarks (use Xwords!) so Delicious is also good as a place to have a semi-permanent location for those links you just can’t lose.

curl -k --user username:passwd \
-o /path/to/file/delicious_backup.xml  \
-O 'https://api.del.icio.us/v1/posts/all'

Backing Up MySQL

Databases don’t take up a ton of space and compress very well. Here is a quick way to backup all your databases and paired with the email script I posted earlier, you can quickly backup your MySQL data.

#!/bin/bash
 
mysqldump --all-databases -uroot -pPASSWD > /directory/path/all_databases.sql
echo $(date) $0 >>; /var/log/sqldump_backup.log

Quick and Easy Backup

With Google mail offering all that space, it begs to be used as a an alternate backup location. The following script will tar then bzip2 a directory and email it to you as an attachment. Set this up in cron and forget. Probably not a good idea for pictures, but it has saved my butt a couple of times for config files and scripts.

1
2
3
4
5
6
7
8
#!/bin/bash
tar -P --create --file=/path/to/archive/file.tar \
/etc/somewhere/
bzip2 -f /path/to/archive/file.tar
 
sendEmail -f backup@servername.com \
-t destination@address.com -u "backup" \
-a /path/to/archive/file.tar.bz2 -m blank