Ubuntu :: Using Bash And Mysqldump To Dump Only Tables With Prefixes?
Nov 18, 2010
Let's say we have a file tables listing all the tables of a database.Can I use grep and mysqldump to dump only tables with certain prefix? I tried
grep prefix_ tables | mysqldump -u root -p databasename > db.sql
but this takes all the tables..
View 1 Replies
ADVERTISEMENT
Sep 20, 2010
When I execute the command below, does mysqldump lock all tables while the backup is in process? I want to make sure this is the appropriate type of backup command for MyISAM database.
mysqldump -h myhostname --default-character-set=utf8 -u root --password=mypassword --opt --single-transaction DBname > /root/backup.sql
View 2 Replies
View Related
Jan 23, 2010
I am attempting to write a backup script that will do the following:
1) lock and flush tables on a mysql db
2) dump the db to a file
3) unlock the tables
4) rsync the file to offsite storage
It all seems to be going well. However, obviously I don't want to setup ssh to the storage server on another network as the root user without a password. so I am attempting to su as the backup user inside of the script but when I try to run the script everything happens as it should until I try to so.. then it jumps out of the script .. akss me to login as the backup user.. proceeds to rsync to the offsite storage it does all this and then resumes execiting the script. it is not going to be setup as a cron job. it will be executed manually. assuming that is the case, how can I get the script to run without prompting for a password?
Here is what I've come up with so far... assuming that the script is run as root and the identity of the backup user will need to be assumed inside the script without perstering the user to enter the backup user's password.
[Code]....
View 8 Replies
View Related
Sep 6, 2010
I have used Dump Command to dump the application files. For Full backup the level 0 is working fine. For incremental backup I used the level 1 or 2 it is getting the error as
DUMP: Only level 0 dumps are allowed on a subdirectory
DUMP: The ENTIRE dump is aborted.
The code I used
===============================
#!/bin/bash
#Full Day Backup Script
#application folders backup
#test is the username
now=$(date +"%d-%m-%Y")
[Code]...
View 2 Replies
View Related
Oct 7, 2009
I want to generate core dump files from my program when it crashes. Its a pretty big process and has about 10-11 threads in it.I have followed the documentation to enable core dump by setting ulimit to unlimited etc. I quickly tried "A demo program creating a core dump" from the following webpage, which succeeds in Segfault and dumping a core file in the directory that I configured.However, I tried running my original program and caused it to crash. I did this by making calls to kill(), raise() or the same null pointer access as shown in the webpage above. In each case, my program crashed but did not generate a core dump file. Am I missing something?My program is in C++ and my environment is Redhat 9.0 (kernel 2.4.20)
Going through the "Why do I NOT get a core dump?" section on the same webpage as above, I can see two potential problems. One - there are issues with the suid/sgid (bullet # 6). I am not able to change any settings with suid because my system does not contain either /proc/sys/fs/suid_dumpable or /proc/sys/kernel/suid_dumpableTwo, my program has threads in it and the bullet # 8 is the problem.
View 1 Replies
View Related
May 30, 2010
I have laptop Dell Vostro V13:
[code]...
I'll provide this info, if this can help to improve Debian on this hardware. I always see this ACPI errors in dmesg:
[ 0.084001] ACPI Error: ACPI path has too many parent prefixes (^) - reached beyond root node (20090903/nsaccess-429)
[ 0.084001] ACPI Error (psargs-0359): [^LPCB.EC0_.LANW] Namespace lookup failure, AE_NOT_FOUND
[ 0.084001] ACPI Error (psparse-0537): Method parse/execution failed [] (Node c14edd50), AE_NOT_FOUND
i also attached full dmesg, and some outputs. Hope, that this can be useful for core developers.
View 1 Replies
View Related
Jul 13, 2010
I would like to have my backup script that I am writing to create a sql dump of my database and go directly into a tar file. Does anyone know how I could do this with one command?
To be more clear I would like to go from
mysqldump -u xxxx -pXXXXX tablename> currentbackup.sql
tar -czvf backup-XXXXXXXX.tgz currentbackup.sql
rm currentbackup.sql
To a single command somehow. Does anyone know how I could accomplish something like this?
View 2 Replies
View Related
Aug 2, 2010
I have a LAMP website with mysql backend with InnoDb engine for tables.I would like to be able to use mysqldump to take periodic dumps of the database - WITHOUT having to stop the mysql server (i.e. shutting down the website) for the duration of the backup. not even in the mySQL documentation. A lot of mention is made about mysqlhotcopy, but that only works for IMSAM tables - and is therefore of no interest/use to me.Does anyone know if (how?) I can use mysqldump to take a copy/dump of a database that is still being used?.A link to the official documentation would be very useful, since I want to make sure that I get this absolutely right.I am running on Ubuntu 10.0.4 LTS
View 4 Replies
View Related
Feb 4, 2010
Is it possible to compress the mysqldump output into say db_backup.sql.tgz. Then add that to an existing archive e.g. backup.tgz in one command or on the fly to save space and deleting it?
View 3 Replies
View Related
Jan 20, 2011
I have one doubt, is copying /var/lib/mysql is a good alterntive to mysqldump?.
Because i use rsync to copy /var/lib/mysql for back up without dumping the database. I use rsync to do differential backup up so that it copies /var/lib/mysql to /var/tmp every one minute.
View 14 Replies
View Related
Dec 7, 2010
We are running an adserver with mysql as the database. We backup the database every hour and lately noticed that ads doesn't get delivered at the time of backup. The database size is 1.2 GB in which a single table ifself is 1.1 GB. Googling around the problem says this may be due to lock table feature in mysqldump and disabling it might solve the issue but i'm afraid whether this would be a problem. Can anyone please explain what lock table means and will it be a problem if i disable it or may be any other alternative solutions/assitance (other than master/slave or replication since we cannot afford it at this time) would be really helpful.
View 1 Replies
View Related
Jul 20, 2010
i use linux ubuntu..i try to copy db and type some mysqldump command..but at terminal show: The program 'mysqldump' can be found in the following packages:
* mysql-client-5.0
* mysql-client-5.1
Try: sudo apt-get install <selected package> bash: mysqldump: command not found
how to get mysqldump for my pc? i've tried to follow the instruction,but show like below:
Err http://ubuntu-ashisuto.ubuntulinux.jp jaunty/main libnet-daemon-perl 0.43-1 Could not connect to ubuntu-ashisuto.ubuntulinux.jp:80 (122.216.218.146), connection timed out
View 3 Replies
View Related
Apr 22, 2011
I've this script which takes backup of mysqldb through mysqldump. I need to send an automated email after success/failure mysqldump. How can add this feature in the script? Here's the script:
Code:
#!/bin/sh
BACKUP=/data/backup/sql2/new_backup/daily
cd $BACKUP
mkdir `date '+%d-%m-%Y'`
NOW=$(date +"%d-%m-%Y")
code....
View 3 Replies
View Related
Apr 14, 2010
My cron job is executing the below mysqldump command but it produces an empty sql file. However, when I run from the command line, it works as expected.
Code:
15 6 * * * root mysqldump -uroot -pXXXXXXX mydbname | gzip > /home/dbbackup/db_`/bin/date +\%Y\%m\%d\%H\%M`.sql.gz
I'm on CentOS 5.4 and use "env EDITOR=nano crontab -e" edit my cron (then paste the above command.
View 5 Replies
View Related
Feb 18, 2011
I have some tables that contain special characters from different languages like German, Italian, Russian, Spanish etc. They are stored and displayed correctly.
When want to backup my DB like "mysqldump -h localhost-u root -p dbname > dbname.sql" the special characters are lost, they are not correctly stored nor displayed in the sql file. This means there is no possible restoration.
View 3 Replies
View Related
Jan 14, 2010
I just backup my mysql db using mysqldump. I run it around 6pm of the evening but I just notice that on the last part of the dump file, it says "Dump completed on 2010-01-14 11:30:01". The time is "Jan 14 19:30" when I run mysqldump. Though the content is corrent, I still want to know why the dump reported it was completed but wrong time. I don't have my.cnf on my /etc so it means all was default by mysql. If I'm not mistaken, timezone by default in mysql is gmt.
My /etc/sysconfig/clock is
ZONE="Asia/Manila"
UTC=true
ARC=false
When I do "select now();" on mysql shell, it was the same with my system. I want to prove my backup was right but this thing confuse me a bit.
View 1 Replies
View Related
Jan 22, 2010
if I run mysqldump from crontab and error occurs, I would like to have email send to me (reporting that backup is not working).
View 2 Replies
View Related
Jan 2, 2011
I noticed in phpmyadmin that we can export a database in type update. Indeed we have update... in place of insert.... is there anyone know if it possible by a command line or by a simple PHP code ?
View 1 Replies
View Related
Jun 2, 2010
Dear Experts,
I am having a 1 gb of mysqldump. When i try to restore this dump file, it is giving error " ERROR 1153 (08S01) at line 289: Got a packet bigger than 'max_allowed_packet' bytes". And with this i am not able to restore the database. mysqld version is 5.0.77.
View 4 Replies
View Related
Apr 2, 2010
Where the cron tables are stored?
IE crontab -e (or -l)
and
the system one :-
sudo crontab -e (or -l)
I need to retrieve them from a system backup, don't know where to look.
View 2 Replies
View Related
Jan 22, 2010
i have an AP set up and would like to have all requests for a website sent to a specific ip address.. and am trying to get this to work in IP tables
user-->AP-->google.com
no matter what site they try to goto it takes them to [URL] i want to use this to require people to login to my server when they connect to my AP before they can go any further.
View 4 Replies
View Related
Jul 6, 2011
I am looking for a scriptable solution for downloading tables that are embedded into webpages. If I wanted to save this table to a csv file what would I need to use. On Winders, I currently have Excel doing the job with a script.[URL]
View 2 Replies
View Related
Feb 18, 2010
I got a backup file which first 1000 bytes are as follows:
Code:
00000000 54 41 50 45 00 00 03 00 8c 00 0e 01 00 00 00 00 |TAPE............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000030 02 00 87 05 51 64 50 48 01 00 00 00 01 00 00 00 |....QdPH........|
[code]....
I tried to restore it:
Code:
$ restore -r -f zzz_labxxxx
Checksum error 32615101403, inode 0 file (null)
restore: Tape is not a dump tape
What application could I use or even try? The man who made the backup can't be reached anymore and we had been left with the backup.
View 1 Replies
View Related
May 27, 2010
To get core dump from my program, I execute the following commands from the terminal:
ulimit -c unlimited
myprogram
After program crash, I see core file in the home directory. How can I make this mode persistent, to have code dump always?
View 4 Replies
View Related
Sep 1, 2010
I have 2 routers both with 5 network cards (both different subnets). On both machines I have the following configuration: Eth0 is the internet conection, Eth1 is the conection to the other router and the other network cards are for the subnets.My current Ip tables script allows all the subnets of one router to see each other but not the subnets of the other router.
In the new situation I want not all but specific subnets to see each other (no problem here)The issue is that some of theese subnets are subnets of the other router. For example the subnet of eth2 router1 should be able to connect to eth 3 on router2. This is were eth1 comes in play. My plan was to configure iptables so that in above example eht2 would be forwarded to eth1, which will forward to eth1 on router2.Then the iptables configuration on router2 will forward it to the network card of the correct subnet.
eth2 (router1) -> eth1 (router1)
eth1 (router1) -> eth1 (router2)
eth1 (router2 -> eth3 (router2)
[code]....
View 5 Replies
View Related
Jan 5, 2010
If any real hassle using a database between web sites. Not obviously phpBB but rather various projects that need a common read access to maintain a relation
View 1 Replies
View Related
Apr 3, 2011
Where and how can edit Linux routing table?
View 4 Replies
View Related
Jul 3, 2011
i managed to make me a script to reconfigure automacitally my routing tables (wireless internet; wired a connected hotspot for my ftpd) now i need at last to remove line "2" from /etc/resolv.conf
when i try to
Code:
root@HP-Compaq-8510w:~# vi +2 --cmd "dd" /etc/resolv.conf
i get
Quote:
Error detected while processing pre-vimrc command line:
E492: Not an editor command: dd
Press ENTER or type command to continue
View 9 Replies
View Related
Jul 4, 2011
I have a webcam that periodically gets dumped and I have to unplug and plug back in to get it to work again. I think it has to do with somethign about how the webcam is USB 2.0 but my PC is USB 1.0, even though it says it is USB 2.0. In Windows it would also dump it but then it would automatically remount it.
View 1 Replies
View Related
Aug 15, 2011
Recentrly my servers mysql has updated and now i have problems with my phpbb database. I cannot access some of the tables or back-up them. I did some research and founded that becouse of the update, my old my.cnf has been replaced and lost setiings for innodb. I founded the file, but i don't know how to make it work.
I do not have a back-up of the old my.cnf
View 2 Replies
View Related