Archive for the Category » backup «

Sunday, August 04th, 2013 | Author:

Istwa

Anpil te chanje depi dènye mansyone mwen pèsonèl sèvè – li te grandi pa leaps ak limit (li kounye a gen yon 7TB MD RAID6) epi li te dènyèman te rebati ak Ubuntu Sèvè.

Arch pa te janm yon erè. Arch Linux te deja te moutre m 'anpil sou Linux (epi yo pral kontinye fè sa sou Desktop lòt m '). Men, Arch definitivman mande pou plis tan ak atansyon pase Mwen ta renmen pase sou yon sèvè. Idealman mwen ta pito pou kapab bliye sou sèvè a pou yon ti tan jiskaske yon imel rapèl di “um … gen yon dènye koup ou ta dwe gade nan, zanmi.”

Espas se pa gratis – ak ni se pa espas

Opòtinite nan emigre nan Ubuntu te lefèt ke mwen te kouri soti nan Sata pò, pò yo oblije konekte kondui difisil yo rès la nan òdinatè a – ki etalaj ATAK 7TB sèvi ak yon anpil nan pò! Mwen te menm ki te fè kado mwen trè fin vye granmoun 200GB ki gen kapasite difisil kòm li te pran moute youn nan moun ki pò. Mwen menm mwen te avèti moun k ap resevwa a ki gen kapasite a SMART siveyans endike li te enfidèl. Kòm yon solisyon tanporè nan mank nan pò sata, Mwen te menm te imigre eksplwatasyon sèvè a nan yon seri kat baton USB nan yon MD RAID1. Fou. Mwen konnen. Mwen pa t 'twò kontan sou vitès la. Mwen deside ale deyò epi yo achte yon nouvo serye kondwi difisil ak yon kat ekspansyon sata yo ale ak li.

Prensipal patisyon sèvè a nan Arch te lè l sèvi avèk sou 7GB nan ki gen kapasite. Yon moso gwo nan sa ki te yon swap dosye, done kach ak otreman divès oswa nesesè dosye. An tou gwosè aktyèl la nan eksplwatasyon an, ki gen ladan an /lakay katab, te sèlman sou 2GB. Sa a pouse m 'nan gade nan yon super vit- SSD kondwi, panse petèt yon yon sèl ki pi piti yo pa ta ka tèlman chè. Li te tounen soti ke pi bon mache ki pa SSD kondwi a mwen te kapab jwenn aktyèlman koute plis pase youn nan sa yo SSDs relativman ti. Ye pou m '. 🙂

Chwa? Wa?!

Lè w ap chwazi eksplwatasyon an, Mwen ta deja deside li pa ta dwe Arch. Soti nan tout distribisyon yo ak lòt popilè, Mwen se pi abitye ak Ubuntu ak CentOS. Fedora te tou yon posibilite – men mwen pa t 'seryezman ankò konsidere li pou yon sèvè. Ubuntu te genyen tou nan.

Desizyon nan pwochen mwen te fè pa t 'rive jwenn mwen an rive Ubikwite (Sòsye enstalasyon ubentu a) mande li nan m ': Kouman yo mete a moute Partitions.

Mwen te nouvo nan lè l sèvi avèk SSDs nan Linux – Mwen byen okouran de Handbuch yo nan pa sèvi avèk yo kòrèkteman, sitou akòz risk yo nan lonjevite pòv si abusive.

Mwen pa t 'vle sèvi ak yon patisyon swap devwe. Mwen plan sou mete ajou mèr sèvè a / CPU / memwa pa twò lwen nan lavni an. Ki baze sou ki mwen deside mwen pral mete swap nan yon dosye swap sou atak la MD ki deja egziste. Swap a pa pral patikilyèman vit, men objektif sèlman li yo pral pou sa okazyon ra lè yon bagay nan ale mal ak memwa a pa disponib.

Sa a Lè sa a, kite m 'bay la chemen rasin 60GB a plen soti nan yon Intel 330 SSD. Mwen konsidere separe / kay, men li jis te sanble yon ti kras initil, bay ki jan ti kras te itilize nan tan lontan an. M 'premye mete kanpe patisyon an ak Lvm – yon bagay mwen te dènyèman te fè lè mwen mete kanpe yon bwat Linux (vrèman, gen nan pa gen eskiz pa sèvi ak lvm). Lè li te rive nan pati a kote mwen ta konfigirasyon filèsistèm a, Mwen klike drop-desann epi enstenktivman chwazi ext4. Lè sa a, mwen remake btrfs nan lis la menm. Kwoke sou!!

Men, yon sa?

Btrfs (“bè-efe-ESS”, “pi bon-efe-ESS”, “myèl-pyebwa-efe-ESS”, oswa kèlkeswa sa ou imajine nan jou a) se yon relativman nouvo filèsistèm devlope yo nan lòd pote Linux’ kapasite filèsistèm retounen sou track ak teknoloji aktyèl filèsistèm. Wa a-of-a-Hill ki deja egziste filèsistèm, “ext” (vèsyon aktyèl la rele ext4) se trè bon – men li se sèlman, kole nan yon paradigm fin vye granmoun (panse a yon mak nouvo F22 raptor vs. yon F4 Phantom ak yon tantativ mwatye jwe li t'ap jwe nan yon ajou ekivalans) ak se fasil yo dwe kapab fè konpetisyon pou trè long ak plus filèsistèm Enterprise tankou ZFS Oracle a. Btrfs toujou gen yon fason lontan yo ale epi li se toujou konsidere kòm eksperimantal (depann sou ki moun ou mande ak sa ki karakteristik ou bezwen). Anpil konsidere li yo dwe ki estab pou itilize de baz – men pa gen moun ki pral fè okenn garanti. Ak, nan kou, tout moun ap di yo fè ak teste sovgad!

Mooooooo

Diferans ki pi fondamantal ant ext ak btrfs se ke btrfs se yon “Bèf” oswa “Kopi sou Ekri” filèsistèm. Sa vle di ke done se pa janm aktyèlman fè espre efase pa entèrn filèsistèm a. Si ou ekri yon chanjman nan yon dosye, btrfs pral ekri chanjman ou a nan yon kote nouvo sou medya fizik epi yo pral mete pwent yo entèn, al gade nan kote a nouvo. Btrfs ale yon etap pi lwen nan ke moun endikasyon entèn (refere yo kòm Metadata) yo se tou Bèf. Vèsyon ki pi ansyen nan ext ta gen tou senpleman efase done yo. Ext4 ta sèvi ak yon Journal asire ke koripsyon pa pral rive yo ta dwe ploge nan AC yanked soti nan moman sa a ki pi inoportun. Rezilta yo jounal nan yon nimewo ki sanble nan etap oblije mete ajou done. Avèk yon SSD, pyès ki nan konpitè ki kache opere yon pwosesis bèf ki sanble pa gen pwoblèm sa filèsistèm w ap itilize. Sa a se paske SSD kondui pa ka aktyèlman recouvrir done – yo gen a kapab bay kopi done yo (ak chanjman ou) nan yon kote ak nouvo Lè sa a, efase blòk la fin vye granmoun antyèman. Yon optimize nan zòn sa a se ke yon SSD ka pa menm efase blòk la fin vye granmoun men pito tou senpleman fè yon nòt ou efase blòk la nan yon moman pita lè bagay sa yo yo pa konsa pou sa okipe. Rezilta a fen se ke kondui SSD anfòm trè byen ak yon filèsistèm bèf epi yo pa fè kòm byen ak ki pa bèf filèsistèm.

Pou fè zafè enteresan, Bèf nan filèsistèm a fasil ale men nan men ak yon karakteristik rele deduplikasyon. Sa a pèmèt de (oswa plis) blòk ki idantik nan done yo dwe estoke lè l sèvi avèk sèlman yon kopi sèl, ekonomize espas. Avèk bèf, si se yon dosye deduplicated modifye, jimo a apa pa pral afekte kòm done dosye a modifye a pral yo te ekri nan yon blòk diferan fizik.

Bèf nan vire fè snapshotting relativman fasil a aplike. Lè yo bay yon snapshot te fè sistèm nan senpleman anrejistre snapshot nan nouvo tankou se te yon repetisyon nan tout done ak Metadata nan volim nan. Avèk bèf, lè chanjman yo te fè, done snapshot an rete entak, epi li ka yon View ki konsistan de estati filèsistèm a nan lè yo te snapshot a te fè yo ap konsève a.

Yon zanmi nouvo

Avèk pi wo a nan nan tèt ou, espesyalman kòm ubentu te fè btrfs disponib kòm yon opsyon enstale-fwa, Mwen kalkile li ta yon bon moman yo plonje nan btrfs ak eksplore yon ti kras. 🙂

Pati 2 vini byento …

pataje
Saturday, February 21st, 2009 | Author:

The relatively new document types Office 2007 has given some web hosts problems when their clients want to offer documents for download. Most often, the documents are being offered by the web server as text/html which is then rendered as a ton of garbage on the web user’s screen.

The best way to resolve this is to add all the MIME types to the server’s main configuration. IIS7 for Windows already has these MIME types set up correctly by default. IIS6 and IIS5 require the MIME types to be added, as might Apache on older installations. For Apache, there is also a workaround for the individual domain owner to add the mime types via Apache’s .htaccess dosye.

IIS 6 MIME type addition (for the Server Administrator)

Before this can be done, ensure that your server is also set to allow direct metabase editing:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Right click theserverand clickProperties
  3. Within theInternet Information Servicestab (usually the only tab), ensure that theEnable Direct Metabase Editcheckbox is checked.
  4. Click [OK]

Be sure to back up IIS’s configuration (isit la for IIS5) beforehand. I won’t take any responsibility for an admin breaking his server. I have reason to believe this may also work on IIS5 however I have just as much reason to believe that it might just give lots of errors. If an IIS5 / Windows 2000 admin is willing to test this for me after backing up your configuration please let me know of the results.

Copy the following text into a file named msoff07-addmime.vbs and execute it once from the commandline by typing cscript msoff07-addmime.vbs and pressing Enter. If you run it more than once, the MIME types will be added each time and you will have multiple identical entries:

' This script adds the necessary Office 2007 MIME types to an IIS 6 Sèvè.
' To use this script, just double-click or execute it from a command line.
' Running this script multiple times results in multiple entries in the
' IIS MimeMap so you should not run it more than once.
' Modified from http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
' Set the MIME types to be added
MimeTypesToAddArray = Array(".docm", "application/vnd.ms-word.document.macroEnabled.12", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/vnd.ms-word.template.macroEnabled.12", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/vnd.ms-excel.addin.macroEnabled.12", _
".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12", _
".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/vnd.ms-excel.template.macroEnabled.12", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
' Get the mimemap object
Set MimeMapObj = GetObject("IIS://LocalHost/MimeMap")
 
' Call AddMimeType for every pair of extension/MIME type
For counter = 0 to UBound(MimeTypesToAddArray) Etap 2
    AddMimeType MimeTypesToAddArray(counter), MimeTypesToAddArray(counter+1)
Next
 
' Create a Shell object
Set WshShell = CreateObject("WScript.Shell")
 
' Stop and Start the IIS Service
Set oExec = WshShell.Exec("net stop w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Loop
 
Set oExec = WshShell.Exec("net start w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Loop
 
Set oExec = Nothing
 
' Report status to user
WScript.Echo "Microsoft Office 2007 Document MIME types have been registered."
 
' AddMimeType Sub
Sub AddMimeType (Ext, MType)
 
    ' Get the mappings from the MimeMap property.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
 
    ' Add a new mapping.
    i = UBound(MimeMapArray) + 1
    Redim Preserve MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Extension = Ext
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
End Sub

Apache MIME type addition (for the Server Administrator)

Apache stores its MIME types in a file normally located at $installpath/conf/mime.types. See the mod_mime documentation for more on how it works. Arch Linux installs its MIME types at /etc/httpd/conf/mime.types ak Parallels Plesk installs it in /usr/local/psa/admin/conf/mime.types. Your distribution might have it in another place, so find your mime.types file by running locate mime.types.

Add the following lines to your mime.types file:

application/vnd.ms-word.document.macroEnabled.12                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/vnd.ms-word.template.macroEnabled.12                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/vnd.ms-powerpoint.template.macroEnabled.12                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/vnd.ms-powerpoint.addin.macroEnabled.12                       ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-powerpoint.slide.macroEnabled.12                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/vnd.ms-excel.addin.macroEnabled.12                            xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12                     xlsb
application/vnd.ms-excel.sheet.macroEnabled.12                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/vnd.ms-excel.template.macroEnabled.12                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME type addition (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess dosye, most commonly in an httpdocs/ directory

AddType application/vnd.ms-word.document.macroEnabled.12 docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.ms-word.template.macroEnabled.12 dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
pataje