Results 1 to 2 of 2
I need a little help with the dump/restore utility. The system is a small Centos 6.4 system at a client of mine that hosts a MySql db. The dumps are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-30-2013 #1
- Join Date
- Sep 2013
Issues with Dump utility...
I need a little help with the dump/restore utility. The system is a small Centos 6.4 system at a client of mine that hosts a MySql db. The dumps are done to a USB stick and then sync'd to my office offsite. There is a daily cron task that does the incremental dumps:
[##### cron.daily]# cat backupdaily #! /bin/sh ymd=`date +%Y%m%d` dom=`date +%-e` mysqldump --all-databases --events --password="}/p<inY6" > /mysqldump/mysql.sql backuppath='/BackupUSB/'$ymd'root' cmdstr='dump -'$dom'u -f '$backuppath' /' `$cmdstr` backuppath='/BackupUSB/'$ymd'boot' cmdstr='dump -'$dom'u -f '$backuppath' /boot' `$cmdstr` df
[##### cron.monthly]# cat backupmonthly #! /bin/sh ymd=`date +%Y%m%d` dom=`date +%-e` backuppath='/BackupUSB/'$ymd'rootfull' cmdstr='dump -0u -f '$backuppath' /' `$cmdstr` backuppath='/BackupUSB/'$ymd'bootfull' cmdstr='dump -0u -f '$backuppath' /boot' `$cmdstr`
Last edited by atreyu; 10-02-2013 at 12:12 AM. Reason: added CODE tags to aid in readability
- 10-02-2013 #2
- Join Date
- May 2011
find /etc/cron* /var/spool/cron/ -type f
The second problem is a bit embarrassing - I wanted to restore some items from this system to a development system I have and cannot seem to follow the posts I have found to get it done, mostly because they are tape based examples. If someone can point me to an example of restoring from a backup set on a disk volume, I would much appreciate.
# dump -L testdump -f /tmp/test.dmp /var/www/cgi-bin/
view the dump contents:
# restore -t -f /tmp/test.dmp Dump date: Thu Oct 3 02:08:59 2013 Dumped from: the epoch Level 0 dump of / (dir var/www/cgi-bin/test) on localhost:/dev/sda1 Label: testdump 2 . 130306 ./var 131079 ./var/www 147182 ./var/www/cgi-bin 146593 ./var/www/cgi-bin/test 135444 ./var/www/cgi-bin/test/script.cgi
restore rf /tmp/test.dmp
Note that this could be very dangerous! you could overwrite data so be careful with the restore command!