Daily Archives

Articles indexed Thursday December 30 2010

Page 26/34 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Is this postgres function cost efficient or still have to clean

    - by kiranking
    There are two tables in postgres db. english_all and english_glob First table contains words like international,confidential,booting,cooler ...etc I have written the function to get the words from english_all then perform for loop for each word to get word list which are not inserted in anglish_glob table. Word list is like I In Int Inte Inter .. b bo boo boot .. c co coo cool etc.. for some reason zwnj(zero-width non-joiner) is added during insertion to english_all table. But in function I am removing that character with regexp_replace. Postgres function for_loop_test is taking two parameter min and max based on that I am selecting words from english_all table. function code is like DECLARE inMinLength ALIAS FOR $1; inMaxLength ALIAS FOR $2; mviews RECORD; outenglishListRow english_word_list;--custom data type eng_id,english_text BEGIN FOR mviews IN SELECT id,english_all_text FROM english_all where wlength between inMinLength and inMaxLength ORDER BY english_all_text limit 30 LOOP FOR i IN 1..char_length(regexp_replace(mviews.english_all_text,'(?)$','')) LOOP FOR outenglishListRow IN SELECT distinct on (regexp_replace((substring(mviews.english_all_text from 1 for i)),'(?)$','')) mviews.id, regexp_replace((substring(mviews.english_all_text from 1 for i)),'(?)$','') where regexp_replace((substring(mviews.english_all_text from 1 for i)),'(?)$','') not in(select english_glob.english_text from english_glob where i=english_glob.wlength) order by regexp_replace((substring(mviews.english_all_text from 1 for i)),'(?)$','') LOOP RETURN NEXT outenglishListRow; END LOOP; END LOOP; END LOOP; END; Once I get the word list I will insert that into another table english_glob. My question is is there any thing I can add to or remove from function to make it more efficient. edit Let assume english_all table have words like footer,settle,question,overflow,database,kingdom If inMinLength = 5 and inmaxLength=7 then in the outer loop footer,settle,kingdom will be selected. For above 3 words inner two loop will apply to get words like f,fo,foo,foot,foote,footer,s,se,set,sett,settl .... etc. In the final process words which are bold will be entered into english_glob with another parameter like 1 to denote it is a proper word and stored in the another filed of english_glob table. Remaining word will be stored with another parameter 0 because in the next call words which are saved in database should not be fetched again. edit2: This is a complete code CREATE TABLE english_all ( id serial NOT NULL, english_all_text text NOT NULL, wlength integer NOT NULL, CONSTRAINT english_all PRIMARY KEY (id), CONSTRAINT english_all_kan_text_uq_id UNIQUE (english_all_text) ) CREATE TABLE english_glob ( id serial NOT NULL, english_text text NOT NULL, is_prop integer default 1, CONSTRAINT english_glob PRIMARY KEY (id), CONSTRAINT english_glob_kan_text_uq_id UNIQUE (english_text) ) insert into english_all(english_text) values ('ant'),('forget'),('forgive'); on function call with parameter 3 and 6 fallowing rows should fetched a an ant f fo for forg forge forget next is insert to another table based on above row insert into english_glob(english_text,is_prop) values ('a',1),('an',1), ('ant',1),('f',0), ('fo',0),('for',1), ('forg',0),('forge',1), ('forget',1), on function call next time with parameter 3 and 7 fallowing rows should fetched.(because f,fo,for,forg are all entered in english_glob table) forgi forgiv forgive

    Read the article

  • Pronunciation of programming structures (particularly in c#)

    - by Andrzej Nosal
    As a non-English speaking person I often have problems pronouncing certain programming structures and abbreviations. I've been watching some video tutorials and listening to podcasts as well, though I couldn't catch them all. My question is what is the common or correct pronunciation of the following code snippets? Generics, like IEnumerable<int> or in a method void Swap<T>(T lhs, T rhs) Collections indexing and indexer access e.g. garage[i], rectangular arrays myArray[2,1] or jagged[1][2][3] Lambda operator =>, e.g. in a where extension method .Where(animal => animal.Color == Color.Brown) or in an anonymous method () => { return false;} Inheritance class Derived : Base (extends?) class SomeClass : IDisposable (implements?) Arithemtic operators += -= *= /= %= ! Are += and -= pronounced the same for events? Collections initializers new int[] { 4, 5, 8, 9, 12, 13, 16, 17 }; Casting MyEnum foo = (MyEnum)(int)yourFloat; (as?) Nullables DateTime? dt = new DateTime?(); I tagged the question with C# as some of them are specific to C# only.

    Read the article

  • Using preg_match as boolean AND array

    - by silow
    I have this code where preg_match is used to break up a string into $pmarr array. Index 1 of that array is then being used to set a value $val = $pmarr[1]. $pmarr = array(); if (preg_match($expression, $orig, $pmarr)) { $val = $pmarr[1]; } What I'm wondering about is why the preg_match itself is being used as a boolean. If the expression doesn't match, does the array stay empty and therefore equate to false? Is the above code the same as saying preg_match($expression, $orig, $pmarr); if(isset($pmarr[1]) AND !empty($pmarr[1])){ $val = $pmarr[1]; }

    Read the article

  • Joomla contact form doesn't pass W3C validation

    - by aramaz
    Hi, I get the following error when I try to validate a contact page on my site: document type does not allow element "script" here The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). I am using Joomla 1.5.7, and the doctype is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Any idea how to fix this?

    Read the article

  • ruby syntactic sugar: dealing with nils..

    - by luca
    probably asked already but I couldn't find it.. here are 2 common situation (for me while programming rails..) that are frustrating to write in ruby: "a string".match(/abc(.+)abc/)[1] in this case I get an error because the string doesn't match, therefore the [] operator is called upon nil. What I'd like to find is a nicer alternative to the following: temp="a string".match(/abc(.+)abc/); temp.nil? ? nil : temp[1] in brief, if it didn't match simply return nil without the error The second situation is this one: var = something.very.long.and.tedious.to.write var = something.other if var.nil? In this case I want to assign something to var only if it's not nil, in case it's nil I'll assign something.other.. Any suggestion? Thanks!

    Read the article

  • What's wrong in my JavaScript code?

    - by DarkLightA
    I can't figure out what's wrong. var CarObj = function(passengers, maxLoad, wheels, doors, maxSpeed) { this.passengers = passengers; this.maxLoad = maxLoad; this.wheels = wheels; this.doors = doors; this.maxSpeed = maxSpeed; }; var ferrari = new CarObj(4, "700kg", 4, 2, "360km/h"); var output = new Array(); for (var i = 0; i < ferrari.length; i++) { for (var a in ferrari) { output[i] = a; } } document.getElementById('ELEMENTHERE').innerHTML = (output.join(" "));

    Read the article

  • C# web service, MySql encoding problem

    - by Boban
    I use C# web service to insert, delete and get data from MySql database. The problem is some of the data is in Macedonian (Cyrilic). When I insert directly in the database, it inserts ok. For example: "???" is "???". When I insert throgh the service, it's not. For example: "???" is "???". When I try to get data throug the service, it gets it ok. What's the problem with the inserting? Here is part of my code for inserting: MySqlConnection connection = new MySqlConnection(MyConString); MySqlCommand command = connection.CreateCommand(); command.CommandText = "INSERT INTO user (id_user, name VALUES (NULL, ?name);"; command.Parameters.Add("?name", MySqlDbType.VarChar).Value = name; connection.Open(); command.ExecuteReader(); connection.Close(); return thisrow; Tnq U in advance!!!

    Read the article

  • How detect length of a numpy array with only one element?

    - by mishaF
    I am reading in a file using numpy.genfromtxt which brings in columns of both strings and numeric values. One thing I need to do is detect the length of the input. This is all fine provided there are more than one value read into each array. But...if there is only one element in the resulting array, the logic fails. I can recreate an example here: import numpy as np a = np.array(2.3) len(a) returns an error saying: TypeError: len() of unsized object however, If a has 2 or more elements, len() behaves as one would expect. import numpy as np a = np.array([2.3,3.6]) len(a) returns 2 My concern here is, if I use some strange exception handling, I can't distinguish between a being empty and a having length = 1.

    Read the article

  • How to merge arrays with same key and different value in PHP?

    - by Martin
    Hi guys, I have arrays similarly to these: 0 => Array ( [0] => Finance / Shopping / Food, [1] => 47 ) 1 => Array ( [0] => Finance / Shopping / Food, [1] => 25 ) 2 => Array ( [0] => Finance / Shopping / Electronic, [1] => 190 ) I need to create one array with [0] as a key and [1] as value. The tricky part is that if the [0] is same it add [1] to existing value. So the result I want is: array ([Finance / Shopping / Food]=> 72, [Finance / Shopping / Electronic] => 190); thanks

    Read the article

  • Specify private SSH-key to use when executing shell command with or without Ruby?

    - by Christoffer
    A rather unusual situation perhaps, but I want to specify a private SSH-key to use when executing a shell (git) command from the local computer. Basically like this: git clone [email protected]:TheUser/TheProject.git -key "/home/christoffer/ssh_keys/theuser" Or even better (in Ruby): with_key("/home/christoffer/ssh_keys/theuser") do sh("git clone [email protected]:TheUser/TheProject.git") end I have seen examples of connecting to a remote server with Net::SSH that uses a specified private key, but this is a local command. Is it possible? Thanks

    Read the article

  • PHP - Best practice to retain form values across postback

    - by Adam
    Hello, Complete PHP novice here, almost all my previous work was in ASP.NET. I am now working on a PHP project, and the first rock I have stumbled upon is retaining values across postback. For the most simple yet still realistic example, i have 10 dropdowns. They are not even databound yet, as that is my next step. They are simple dropdowns. I have my entire page inclosed in a tag. the onclick() event for each dropdown, calls a javascript function that will populate the corrosponding dropdowns hidden element, with the dropdowns selected value. Then, upon page reload, if that hidden value is not empty, i set the selected option = that of my hidden. This works great for a single postback. However, when another dropdown is changed, the original 1'st dropdown loses its value, due to its corrosponding hidden value losing its value as well! This draws me to look into using querystring, or sessions, or... some other idea. Could someone point me in the right direction, as to which option is the best in my situation? I am a PHP novice, however I am being required to do some pretty intense stuff for my skill level, so I need something flexable and preferribly somewhat easy to use. Thanks! -----edit----- A little more clarification on my question :) When i say 'PostBack' I am referring to the page/form being submitted. The control is passed back to the server, and the HTML/PHP code is executed again. As for the dropdowns & hiddens, the reason I used hidden variables to retain the "selected value" or "selected index", is so that when the page is submitted, I am able to redraw the dropdown with the previous selection, instead of defaulting back to the first index. When I use the $_POST[] command, I am unable to retrieve the dropdown by name, but I am able to retrieve the hidden value by name. This is why upon dropdown-changed event, I call javascript which sets the selected value from the dropdown into its corrosponding hidden.

    Read the article

  • GameKit peer to peer wifi without wireless router?

    - by Tim
    Hi all! Thanks in advance for any thoughts about this. I'm looking for a way to do realtime inter-app communication in iOS via wi-fi (I need about 150 ft range and don't think bluetooth offers this) and wonder about the peer-to-peer connectivity offered by GameKit which, apparently offers both bluetooth and wi-fi connectivity. My question is: must participating devices be members of an available wireless network (via a wireless router) or is this connectivity truly peer-to-peer requiring no router? I understand Wi-fi Direct is coming and would likely be an option. Just wondering if I can do this utilizing services available in iOS today. Thanks! Tim

    Read the article

  • std::ifstream buffer caching

    - by ledokol
    Hello everybody, In my application I'm trying to merge sorted files (keeping them sorted of course), so I have to iterate through each element in both files to write the minimal to the third one. This works pretty much slow on big files, as far as I don't see any other choice (the iteration has to be done) I'm trying to optimize file loading. I can use some amount of RAM, which I can use for buffering. I mean instead of reading 4 bytes from both files every time I can read once something like 100Mb and work with that buffer after that, until there will be no element in buffer, then I'll refill the buffer again. But I guess ifstream is already doing that, will it give me more performance and is there any reason? If fstream does, maybe I can change size of that buffer? added My current code looks like that (pseudocode) // this is done in loop int i1 = input1.read_integer(); int i2 = input2.read_integer(); if (!input1.eof() && !input2.eof()) { if (i1 < i2) { output.write(i1); input2.seek_back(sizeof(int)); } else input1.seek_back(sizeof(int)); output.write(i2); } } else { if (input1.eof()) output.write(i2); else if (input2.eof()) output.write(i1); } What I don't like here is seek_back - I have to seek back to previous position as there is no way to peek 4 bytes too much reading from file if one of the streams is in EOF it still continues to check that stream instead of putting contents of another stream directly to output, but this is not a big issue, because chunk sizes are almost always equal. Can you suggest improvement for that? Thanks.

    Read the article

  • Wpf. Chart optimization. More than million points

    - by Evgeny
    I have custom control - chart with size, for example, 300x300 pixels and more than one million points (maybe less) in it. And its clear that now he works very slowly. I am searching for algoritm which will show only few points with minimal visual difference. I have link to component which have functionallity exactly what i need (2 million points demo): http://www.mindscape.co.nz/demo/SilverlightElements/demopage.html#/ChartOverviewPage I will be grateful for any matherials, links or thoughts how to realize such functionallity.

    Read the article

  • Opacity in CSS, some doubts

    - by André
    Hi, I have some doubts with opacity in CSS. I have a Header and a Footer that uses opacity, but I would like to turn off opacity the opacity in the text. Is that possible? To a better understanding I will post the code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> stu nicholls | CSS PLaY | cross browser fixed header/footer layout basic method </title> <style type="text/css" media="screen"> #printhead {display:none;} html { height:100%; max-height:100%; padding:0; margin:0; border:0; background:#fff; font-size:80%; font-family: "trebuchet ms", tahoma, verdana, arial, sans-serif; /* hide overflow:hidden from IE5/Mac */ /* \*/ overflow: hidden; /* */ } body {height:100%; max-height:100%; overflow:hidden; padding:0; margin:0; border:0;} #content {display:block; height:100%; max-height:100%; overflow:hidden; padding-left:0px; position:relative; z-index:3; word-wrap:break-word;} #head {position:absolute; margin:0; top:0; right:18px; display:block; width:100%; height:1; background-color:transparent; font-size:1em; z-index:5; color:#000; border-bottom:1px solid #000;} #foot {position:absolute; margin:0; bottom:-1px; right:18px; display:block; width:100%; height:30px; background-color:transparent; color:#000; text-align:right; font-size:2em; z-index:4; border-top:1px solid #000;} .pad1 {display:block; width:18px; height:18px; float:left;} /* Com este "height", alinho a border do header */ .pad2 {display:block; height:100px;} .pad3 {display:block; height:0px;} /* Com este "height" controlo onde começa o content e o scroll do browser */ #content p {padding:5px;} .bold {font-size:1.2em; font-weight:bold;} .red {color:#c00; margin-left:5px; font-family:"trebuchet ms", "trebuchet", "verdana", sans-serif;} h2 {margin-left:5px;} h3 {margin-left:5px;} /* Esta classe controla as caracteristicas do background do footer e do header. */ .bkg { background-color: blue; filter:alpha(opacity=35); /* IE's opacity*/ opacity: 0.35; height: 10; } iframe { border-style: none; width: 100%; height: 100%; } </style> </head> <body> <div id="head"> <div class="bkg"> <div class="pad1"></div>Header </div> </div> <div id="content"> <div class="pad3"></div> <iframe src="http://www.yahoo.com" id="iFrame"></iframe> <div class="pad2"></div> </div> </div> <div id="foot"><div class="bkg">Footer</div></div> </body> </html> I want to maintain the opacity in the blue color in the footer and header but I would like to put the text stronger. Is that possible? Best Regards,

    Read the article

  • What are unused/undeclared dependencies in maven ? What to do with them ?

    - by b7kich
    Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared ? What should I do about them ? Example: $ mvn dependency:analyze ... [WARNING] Used undeclared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.5.0:provided [WARNING] commons-logging:commons-logging:jar:1.1.1:compile [WARNING] commons-dbutils:commons-dbutils:jar:1.1-osgi:provided [WARNING] org.codehaus.jackson:jackson-core-asl:jar:1.6.1:compile ... [WARNING] Unused declared dependencies found: [WARNING] commons-cli:commons-cli:jar:1.0:compile [WARNING] org.mortbay.jetty:servlet-api:jar:2.5-20081211:test [WARNING] org.apache.httpcomponents:httpclient:jar:4.0-alpha4:compile [WARNING] commons-collections:commons-collections:jar:3.2:provided [WARNING] javax.mail:mail:jar:1.4:provided Note: A lot of these dependencies are used in my runtime container and I declared them as provided to avoid having same library on the classpath twice with different versions.

    Read the article

  • CString error, 'CString': is not a member of 'ATL::CStringT<BaseType, StringTraits>'

    - by flavour404
    Hi, I am trying to do this: #include <atlstr.h> CHAR Filename; // [sp+26Ch] [bp-110h]@1 char v31; // [sp+36Ch] [bp-10h]@1 int v32; // [sp+378h] [bp-4h]@1 GetModuleFileNameA(0, &Filename, 0x100u); CString::CString(&v31, &Filename); But I am getting the compiler error C2039:'CString': is not a member of 'ATL::CStringT' This is a non MFC based dll, but according to the docs you should be able to use CString functionality with the include #include atlstr.h how do I make it work? Thanks

    Read the article

  • Android Accessing Accelerometer: Returns always 0 as Value

    - by Rotesmofa
    Hello there, i would like to use the accelerometer in an Android Handset for my Application. The data from the sensor will be saved together with a GPS Point, so the Value is only needed when the GPS Point is updated. If i use the attached Code the values is always zero. API Level 8 Permissions: Internet, Fine Location Testing Device: Galaxy S(i9000), Nexus One Any Suggestions? I am stuck at this point. Best regards from Germany, Pascal import android.app.Activity; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; public class AccelerometerService extends Activity{ AccelerometerData accelerometerData; private SensorManager mSensorManager; private float x,y,z; private class AccelerometerData implements SensorEventListener{ public void onSensorChanged(SensorEvent event) { x = event.values[0]; y = event.values[1]; z = event.values[2]; } public void onAccuracyChanged(Sensor sensor, int accuracy) {} } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mSensorManager.registerListener(accelerometerData, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST); } @Override protected void onResume() { super.onResume(); } @Override protected void onStop() { mSensorManager.unregisterListener(accelerometerData); super.onStop(); } public String getSensorString() { return ("X: " + x+"m/s, Y: "+ y +"m/s, Z: "+ z +"m/s" ); } }

    Read the article

  • To subclass or not to subclass

    - by poulenc
    I have three objects; Action, Issue and Risk. These all contain a nunber of common variables/attributes (for example: Description, title, Due date, Raised by etc.) and some specific fields (risk has probability). The question is: Should I create 3 separate classes Action, Risk and Issue each containing the repeat fields. Create a parent class "Abstract_Item" containing these fields and operations on them and then have Action, Risk and Issue subclass Abstract_Item. This would adhere to DRY principal.

    Read the article

  • Parsing plain data with Javascript (JQuery)

    - by Angelus
    Well , I have this text in a Javascript Var: GIMP Palette Name: Named Colors Columns: 16 # 255 250 250 snow (255 250 250) 248 248 255 ghost white (248 248 255) 245 245 245 white smoke (245 245 245) 220 220 220 gainsboro (220 220 220) 255 250 240 floral white (255 250 240) 253 245 230 old lace (253 245 230) 250 240 230 linen (250 240 230) 250 235 215 antique white (250 235 215) 255 239 213 papaya whip (255 239 213) And What I need is to cut it in lines and put them in one Array , after that i must separate each number and the rest in an string. I'm getting crazy searching functions to do that but now i can't see anyone in Javascript. modified End expected format will be first the next: array[0]='255 250 250 snow (255 250 250)' Then i wanna take it and extract each line into some vars to use them: colour[0]=255; colour[1]=250; colour[2]=250; string=snow (255 250 250); (the vars will be reused with each line)

    Read the article

  • writing a meta refresh method for rails

    - by aaronstacy
    I want a method in app/controllers/application.rb that can prepend/append text to whatever template gets rendered. Of course I can't call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here's what I've got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay) @redirect_delay = delay @redirect_url = url render end app/views/layouts/application.html.erb <!DOCTYPE html> <html lang="en"> <head> <%= yield :refresh_tag %> </head> <body> <%= yield %> </body> </html> So then if I want to add a redirect-after-delay, I add the following to 1) my controller and 2) the action's view: app/controllers/my_controller.rb def my_action redirect_after_delay 'http://www.google.com', 3 if some_condition end app/views/my_controller/my_action.html.erb <% content_for :refresh_tag do %> <meta http-equiv='refresh' content='<%=@redirect_delay%>;url=<%=@redirect_url%>'> <% end %> <h1>Please wait while you are redirected...</h1> Since the content_for block never changes, is it possible to do this in some generic way so that I don't have to put <%= yield :refresh_tag %> in each template? (e.g. could redirect_after_delay add it into whatever template is going to be rendered?)

    Read the article

  • How to make a control invisible?

    - by Nakilon
    I've made several TextCtrls and Button, but currently users of my application don't want to see them. So I have to hide them temporary (for current build). Here they are: class MainFrame < Wx::Frame def initialize (parent = nil) super nil,:title=>"sometitle",:size=>[600,600] set_sizer Wx::BoxSizer.new Wx::VERTICAL @tag1 = Wx::TextCtrl.new self sizer.add_item @tag1,:flag=>Wx::RIGHT|Wx::EXPAND @tag1.set_value 'property' @tag1title = Wx::TextCtrl.new self sizer.add_item @tag1title,:flag=>Wx::RIGHT|Wx::EXPAND @tag1title.set_value 'title' @tag2 = Wx::TextCtrl.new self sizer.add_item @tag2,:flag=>Wx::RIGHT|Wx::EXPAND @tag2.set_value 'description' @tag2title = Wx::TextCtrl.new self sizer.add_item @tag2title,:flag=>Wx::RIGHT|Wx::EXPAND @tag2title.set_value '' @button_parse = Wx::Button.new self sizer.add_item @button_parse @button_parse.label = "Parse XML" evt_button @button_parse, :click_parse # ...... end # ...... end I see nothing about it in docs and Google is also not a friend for me today.

    Read the article

  • How to migrate an SQLServer 2000 database from one machine to another

    - by Saiyine
    This January I'm migrating our main SQLServer 2000 based database to a beefier server. Is there any standard procedure or documentation on how to do it? I need to replicate all at the new server (databases, jobs, DTSs, vinculated servers, etc). Edit: I mean SQLServer 2000 on both ends! Edit: Be calm, people, I just crossed the versions from another software I posted about at the same time as this. Effectively, I even checked the wikipedia to be sure version 8 was 2000. Don't need to flame that much about what is just an errata.

    Read the article

  • Should use EXT4 or XFS to be able to 'sync'/backup to S3?

    - by Rafa
    It's my first message here, so bear with me... (I have already checked quite a few of the "Related Questions" suggested by the editor) Here's the setup, a brand new dedicated server (8GB RAM, some 140+ GB disk, Raid 1 via HW controller, 15000 RPM) it's a production web server (with MySQL in it, too, not just serving web requests); not a personal desktop computer or similar. Ubuntu Server 64bit 10.04 LTS We have an Amazon EC2+EBS setup with the EBS volume formatted as XFS for easily taking snapshots to S3, via AWS' console. We are now migrating to the dedicated server and I want to be able to backup our data to Amazon's S3. The main reason being the possibility of using the latest snapshot from an EC2 instance in case of hardware failure on the dedicated server. There are two approaches I am thinking of: do a "simple" file-based backup with rsync, dumping the database' and other files, and uploading to amazon via S3 API commands, or to an EC2 instance, or something. do a file-system "freeze" (using XFS) with the usual ebs/ec2 snapshot tool to take part of the file system, take a snapshot, and upload it to Amazon. Here's my question (or series of questions): Can I safely use XFS for the whole system as the main and only format on the dedicated server? If not, is it safe to use EXT4? Or should I use something else? would then be possible to make snapshots of the system to upload to Amazon? Is it possible/feasible/practical to do what I want to do, anyway? any recommendations? When searching around for S3/EBS/XFS, anything relevant to my problem is usually focused on taking snapshots of a XFS system that is already an EBS volume. My intention is to do it in a "real"/metal dedicated server. Update: I just saw this on Wikipedia: XFS does not provide direct support for snapshots, as it expects the snapshot process to be implemented by the volume manager. I had always assumed that I could choose 2 ways of doing snapshots: via LVM or via XFS (without LVM). After reading this, I realize these 2 options are more like it: With XFS: 1) do xfs_freeze; 2) copy the frozen files via, eg, rsync; 3) unfreeze xfs With LVM and XFS: 1) do xfs_freeze; 2) make a binary copy of the frozen fs via lvcreate and related commands; 3) unfreeze xfs; 4) somehow backup the LVM snapshot. Thanks a lot in advance, Let me know if I need to clarify something.

    Read the article

  • Ghost/Acronis/Clonezilla Live Image Creation (Without Rebooting)

    - by user39621
    I know Ghost and Clonezilla aren't able to build images of a system while the system is running(Without Rebooting). Haven't Checked on Acronis though, but i don't simpatize with private solutions. Question: Is there a software solution which is able to build a "Live" image? Would appreciate anwsers, since I'm one step away from building a Clonezilla test enviroment and this will just help on my decision. Thank you.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >