PDA

View Full Version : not using double space



lovewadhwa
July 31st, 2007, 02:05 AM
hi
there has been a problem if i use zrm since i do have mysql databases of very large sizes.The problem is that zrm makes a double copy of the databases to backup ,thus requiring more disk space.However if i don't use zrm and use mysqlhotcopy with the method specified as scp then i can easily get the backup of databases without having double space.But the problem is if i do take backup through mysqlhotcopy with the method as scp then i can only take backup of a single database at a time whereas my requirement is to take the backup of the entire data directory.This can be done through zrm but my problem is that i do have to get extra disk space for it which is not possible for me.So what i do need is if there can be a help regarding change in the code where i can specify the method as scp in zrm.Means i want to say right now zrm takes the backup with the method as cp but i need that besides this method if some pains could be done that it starts favouring scp method even.

Kindly help regardin the same.Hoping a quick and positive response from ur side.

kkg
July 31st, 2007, 08:01 PM
hi
there has been a problem if i use zrm since i do have mysql databases of very large sizes.The problem is that zrm makes a double copy of the databases to backup ,thus requiring more disk space.However if i don't use zrm and use mysqlhotcopy with the method specified as scp then i can easily get the backup of databases without having double space.But the problem is if i do take backup through mysqlhotcopy with the method as scp then i can only take backup of a single database at a time whereas my requirement is to take the backup of the entire data directory.This can be done through zrm but my problem is that i do have to get extra disk space for it which is not possible for me.So what i do need is if there can be a help regarding change in the code where i can specify the method as scp in zrm.Means i want to say right now zrm takes the backup with the method as cp but i need that besides this method if some pains could be done that it starts favouring scp method even.

Kindly help regardin the same.Hoping a quick and positive response from ur side.


Hi,

Using scp to copy large databases is probably not a very good idea since this can lead to the tables being locked for an extreamly long time. Please refer to the mysqlhotcopy's own perldoc. I am reproducing the relevant section from the perldoc here. You can read the whole perldoc for mysqlhotcopy by running 'perldoc mysqlhotcopy'

--method=#
method for copy (only "cp" currently supported). Alpha support for
"scp" was added in November 2000. Your experience with the scp
method will vary with your ability to understand how scp works.
'man scp' and 'man ssh' are your friends.

The destination directory _must exist_ on the target machine using
the scp method. --keepold and --allowold are meaningless with scp.
Liberal use of the --debug option will help you figure out what\'s
really going on when you do an scp.

Note that using scp will lock your tables for a _long_ time unless
your network connection is _fast_. If this is unacceptable to you,
use the 'cp' method to copy the tables to some temporary area and
then scp or rsync the files at your leisure.