How to backup otrs
Moderator: crythias
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
How to backup otrs
i went through otrs docs but it only tells about backup in Linux and does not in windows.then i went through some previous post and got to know that we have to do it in the following way
In XP:
open a command prompt
cd C:\Program Files\Otrs\Otrs\Scripts
type
perl backup.pl -d c:\path\to\where\you\want\backup
i did but got following error MSG
'which' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Can't locate cp!
i dont know what this error is all about ??
and if you could please tell me that do we only take the database backup or application folder backup also ???
there is not much available about otrs backup in windows...............
In XP:
open a command prompt
cd C:\Program Files\Otrs\Otrs\Scripts
type
perl backup.pl -d c:\path\to\where\you\want\backup
i did but got following error MSG
'which' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Can't locate cp!
i dont know what this error is all about ??
and if you could please tell me that do we only take the database backup or application folder backup also ???
there is not much available about otrs backup in windows...............
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
Backup of otrs is filesystem backup of otrs directory and mysqldump of the database.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
what about the error msg which i got plz help me its on my nerves...its not helping with perl command whatsoever i do....moreover what would be the restoration process after that ??? can you list down the steps plz.(backup+restore)...
thanks
thanks
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
"which" is a command that is used in linux to find the path of a command. If an equivalent existed in windows, the result for, for instance, "which notepad" would return "c:\windows\notepad.exe" (as an example).
If you are able to make a filesystem backup (what's that? ntbackup, a copy, a .zip, anything that you'd normally use to back up anything else on your system.) of the otrs folder, you will be able to restore with the same method as you backed up.
You will also want to use mysqldump to make a backup of your database.
How?
c:\path\to\mysql\bin\mysqldump -uotrsusername -potrspassword otrsdatabasename > someoutputfile.sql
and backup that someoutputfile.sql .
How to restore:
If OTRS is already installed and you're just moving back in a point in time, restore from your backup method (ntbackup, copy back, unzip, carbonite, mozy, crashplan, backupexec, ...) then mysqldump (edit: to another output file) and then empty your tables and read the someoutputfile.sql via MySQL Workbench or command line.
If OTRS isn't installed, install it at the backed up version level, then do the above things.
Read up on MySQL for more information about table maintenance, backup and restore.
If you are able to make a filesystem backup (what's that? ntbackup, a copy, a .zip, anything that you'd normally use to back up anything else on your system.) of the otrs folder, you will be able to restore with the same method as you backed up.
You will also want to use mysqldump to make a backup of your database.
How?
c:\path\to\mysql\bin\mysqldump -uotrsusername -potrspassword otrsdatabasename > someoutputfile.sql
and backup that someoutputfile.sql .
How to restore:
If OTRS is already installed and you're just moving back in a point in time, restore from your backup method (ntbackup, copy back, unzip, carbonite, mozy, crashplan, backupexec, ...) then mysqldump (edit: to another output file) and then empty your tables and read the someoutputfile.sql via MySQL Workbench or command line.
If OTRS isn't installed, install it at the backed up version level, then do the above things.
Read up on MySQL for more information about table maintenance, backup and restore.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
if i have done filesystem backup of otrs folder through backupexec then is it optional or mandatory to do the mysqldumb
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
I'm going to say strongly recommended unless backup exec is mysql aware or you have an open file option.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
if i simply copy the whole folder of c:\otrs and then i install otrs on any other computer and the replace the otrs with the one i copied...whats going to happen in this case ????
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
It could work, and it might have corrupt tables. Probably not, but unless MySQL server service is stopped, there is no guarantee on what you're copying.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
so after creating someoutputfile.sql and backing it up......is there any restore command of MySQL to use on new installation...???? and if we do only this sqldump part and dont do filesystem folder copy ??? what then??
i am little confused on that .....
i am little confused on that .....
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
OTRS comes in two parts: 1) The file system (what makes the program run, and its accompanying config files.) and 2) The database that holds the ticket information.
If you don't back up the file system files, you'll be reasonably okay, but any configurations will need to be completed again, including how to connect to your database.
If you don't back up the database properly, you may lose the ability to access the tickets properly.
If you *stop* the mysql service before backing up the filesystem, then you have a good chance of not needing to make the sql dump, but since this is trivial to do, unless you are out of space, why risk it?
If you stop the mysql service and back up the mysql data structure, you should be able copy/paste into the same location and start the new server and it should just work.
If you need to reload the .sql dump, it's pretty much
mysql -uotrsusername -ppassword otrsdatabase < outputfile.sql
If you don't back up the file system files, you'll be reasonably okay, but any configurations will need to be completed again, including how to connect to your database.
If you don't back up the database properly, you may lose the ability to access the tickets properly.
If you *stop* the mysql service before backing up the filesystem, then you have a good chance of not needing to make the sql dump, but since this is trivial to do, unless you are out of space, why risk it?
If you stop the mysql service and back up the mysql data structure, you should be able copy/paste into the same location and start the new server and it should just work.
If you need to reload the .sql dump, it's pretty much
mysql -uotrsusername -ppassword otrsdatabase < outputfile.sql
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
I need to be clear about something:
When I say filesystem backup with mysql service stopped, I mean backing up the files that include the MySQL database tables wherever they exist -- as well as OTRS. The MySQL tables may be in different locations, and cannot effectively be relied upon to recover data. But you must (or very well should) stop mysql service in order to back up the tables in use in a filesystem backup. A database dump is always the best recommended way to make a backup of your database. If you don't make and back up your mysqldump, you have no ticket backup.
mysqldump is for creating a backup that can be done at any time. It is one direction! It MAKES an output file.
mysql is the command line interface for interacting with the OTRS data. It can *read* sql data, such as what gets created from the output file.
The backup commands in otrs/scripts/backup.pl essentially do what's described above: Copy all of the otrs folder and make a database dump of the data.
The restore commands in otrs/scripts/restore.pl unzip the backup of the filesystem and restore the data using the mysql command line:
mysql -f -u$DatabaseUser $DatabasePw -h$DatabaseHost $Database < DatabaseBackup.sql
When you see ">" or "<", the pointy bit tells you which direction data is flowing. When it points right, it will overwrite a file. When it points left, it means for programs that handle it, the program will read the data. mysqldump makes files/backups. mysql reads files and modifies database structure and data. Don't get them confused. They are not interchangeable.
When I say filesystem backup with mysql service stopped, I mean backing up the files that include the MySQL database tables wherever they exist -- as well as OTRS. The MySQL tables may be in different locations, and cannot effectively be relied upon to recover data. But you must (or very well should) stop mysql service in order to back up the tables in use in a filesystem backup. A database dump is always the best recommended way to make a backup of your database. If you don't make and back up your mysqldump, you have no ticket backup.
mysqldump is for creating a backup that can be done at any time. It is one direction! It MAKES an output file.
mysql is the command line interface for interacting with the OTRS data. It can *read* sql data, such as what gets created from the output file.
The backup commands in otrs/scripts/backup.pl essentially do what's described above: Copy all of the otrs folder and make a database dump of the data.
The restore commands in otrs/scripts/restore.pl unzip the backup of the filesystem and restore the data using the mysql command line:
mysql -f -u$DatabaseUser $DatabasePw -h$DatabaseHost $Database < DatabaseBackup.sql
When you see ">" or "<", the pointy bit tells you which direction data is flowing. When it points right, it will overwrite a file. When it points left, it means for programs that handle it, the program will read the data. mysqldump makes files/backups. mysql reads files and modifies database structure and data. Don't get them confused. They are not interchangeable.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
i did it also...i copied the whole c:\otrs folder after stopping sql service ......i uninsalled otrs and installed it back,...........i just replaced the c:|otrs folder and it wont let me do it unless i killed perl.exe and httpd.exe processes.... and it copied ..
i checked the otrs....it showed me every thing...............my tickets,my agents,my customers,my groups,my config settings .....i also backed up sql dump file but i did not use it at that time .......later on same day i used mysqldump to dump the sql file in database...and it kept on going showing me some gibberish on the command prompt for some time and then it froze and never came back untill i had to kill the command prompt....i dont know why it hanged up
i tried several times but it freezes up at the end.....so my question was whats the point of sql dump when it is showing me every thing alright without i could dump file back to database ???
is this the way you told me to do it...
actually i am using otrs in testing phase on my computer till the we get used to it and know every thing and then we will install it on our server
i checked the otrs....it showed me every thing...............my tickets,my agents,my customers,my groups,my config settings .....i also backed up sql dump file but i did not use it at that time .......later on same day i used mysqldump to dump the sql file in database...and it kept on going showing me some gibberish on the command prompt for some time and then it froze and never came back untill i had to kill the command prompt....i dont know why it hanged up
i tried several times but it freezes up at the end.....so my question was whats the point of sql dump when it is showing me every thing alright without i could dump file back to database ???
is this the way you told me to do it...
actually i am using otrs in testing phase on my computer till the we get used to it and know every thing and then we will install it on our server
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
mysqldump is a way to be sure (or increase the probability) that you have a cross-platform way of backing up the database. The idea being that if the mysqldump is successful, you will be able to use that file on Windows, Linux, etc to recreate your data.qazi1214 wrote: question was whats the point of sql dump when it is showing me every thing alright without i could dump file back to database ???
If you stop the mysql service, you should theoretically be able to successfully copy the mysql specific files with a standard backup and not use the mysqldump. I can't be sure what's working or not. mysqldump usually works across all platforms and doesn't require knowledge of where the mysql data stores are stored, nor does it require knowledge necessarily of the version of mysql used. It's possible you may have a filesystem backup of the data stores but it may not work in a newer or older version of MySQL.
Another way to attempt to back up is to use MySQL Workbench.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
did you ever experience mysqldump retore process froze on you andpossible reasons for that ??
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
mysqldump doesn't restore. It only makes a backup "dump" of the database. It goes one way -> to a file.qazi1214 wrote:did you ever experience mysqldump retore process froze on you andpossible reasons for that ??
If you run it multiple times on the same file, each time you run it, you will overwrite the the same file.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
but when you are dumping that sql file which was created before with command mysqldump -u root otrs > backup.sql ........in to database with this command mysqldump -u root otrs <backup.sql
what exactly are you doing ???? as i have learned through internet that you have to have database with the same name created in advance so that it matches up the tables and other structure in your database..................so after installing otrs and creating database otrs we have done one step as it would have all those required tables and structure though would be empty ...then with sql dump file we can fill up those tables in otrs database as long as name and other structure remains the same
am i right or wrong in all this ???
what exactly are you doing ???? as i have learned through internet that you have to have database with the same name created in advance so that it matches up the tables and other structure in your database..................so after installing otrs and creating database otrs we have done one step as it would have all those required tables and structure though would be empty ...then with sql dump file we can fill up those tables in otrs database as long as name and other structure remains the same
am i right or wrong in all this ???
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
I don't know how many times I need to say it until you understand. mysqldump makes the backup. mysql reads the backup. That's it. Two different commands. Two different actions.
There really is an honest-to-goodness command that really really is called "mysql" and it is the way to get the data from mysqldump into the database. I've already explained how it works in this thread.
There really is an honest-to-goodness command that really really is called "mysql" and it is the way to get the data from mysqldump into the database. I've already explained how it works in this thread.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 4
- Joined: 07 Dec 2011, 18:51
- Znuny Version: 11.2
Re: How to backup otrs
For the OTRS duplicate you will have to make SQL put first of all. After that duplicate the total OTRS index. Than for a recover the duplicate re-install OTRS offer duplicate back again the OTRS index and than fill the sql duplicate in mysql data source repository. And for getting the options Obtain all program config changes." and the Load Settings in [SysConfig]
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
can you just please mention honest-to-goodness command used to get the data from mysqldump and put it into database...i am asking about a sample of the sytax of mysql command how it would becrythias wrote: There really is an honest-to-goodness command that really really is called "mysql" and it is the way to get the data from mysqldump into the database. I've already explained how it works in this thread.
thanks
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How to backup otrs
I did tell you, three times. I also told you to read up, I also gave links. You must do some more work on your own.
If you still don't get it, hire someone who knows what they're doing.crythias wrote:mysql -uotrsusername -ppassword otrsdatabase < outputfile.sql
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 29
- Joined: 10 Oct 2011, 23:48
- Znuny Version: 3.0.10
- Real Name: Farooq Ahmed
- Company: Ciena Healthcare
Re: How to backup otrs
thanks so much crythias for bearing up with me for a long time.......................... i was confused because on internet i can quote various places where it was mentioned as mysqldump -u root otrs < sql file but no body said
it was actually mysql -u root otrs < sqlfile ....you told me and it did wonders for me..i am so happy everything is restored with this command which i wanted to see...i also copied c:\otrs\otrs for application side ........
is this the right folder to get config settings or other application settings which might be lost if we dont back it up ....or some other folder in c:\otrs you would recommend..........................i am just asking out of curiosity otherwise
i got everything back off about 8 gb data with mysql command to restore database and i also copied back c:\otrs\otrs..........................
again thanks a lot for your help and support without whivh it would ahve been impossible
you r great
it was actually mysql -u root otrs < sqlfile ....you told me and it did wonders for me..i am so happy everything is restored with this command which i wanted to see...i also copied c:\otrs\otrs for application side ........
is this the right folder to get config settings or other application settings which might be lost if we dont back it up ....or some other folder in c:\otrs you would recommend..........................i am just asking out of curiosity otherwise
i got everything back off about 8 gb data with mysql command to restore database and i also copied back c:\otrs\otrs..........................
again thanks a lot for your help and support without whivh it would ahve been impossible
you r great