Archive for the Category » backup «

Sunday, August 04th, 2013 | Author:

Historia

Mengi alikuwa iliyopita tangu mimi mwisho zilizotajwa yangu binafsi server – ni imeongezeka kwa kiwango kikubwa na mipaka (sasa ina 7TB md RAID6) na alikuwa karibuni imekuwa upya kwa Ubuntu Server.

Upinde alikuwa kamwe kosa. Arch Linux alikuwa tayari alinifundisha sana kuhusu Linux (na itaendelea kufanya hivyo kwenye desktop yangu nyingine). Lakini Arch dhahiri inahitaji muda zaidi na makini kuliko napenda kutumia katika server. Walau ningependa wanapendelea kuwa na uwezo wa kusahau kuhusu server kwa muda mpaka email kukumbusha anasema “um … kuna updates wanandoa unapaswa kuangalia, buddy.”

Nafasi si bure – na wala nafasi ya

nafasi ya kuhamia Ubuntu alikuwa na ukweli kwamba nilikuwa kukimbia nje ya SATA bandari, bandari required kuunganisha anatoa ngumu kwa mapumziko ya kompyuta – kwamba 7TB uvamizi safu matumizi mengi ya bandari! Mimi nilikuwa na hata kupewa mbali wangu sana zamani 200GB ngumu kuendesha kama Ni Akachukua moja ya bandari Wale. Mimi pia alionya kwamba mpokeaji disk ya SMART ufuatiliaji unahitajika ilikuwa ni uhakika. Kama workaround muda na ukosefu wa bandari SATA, Mimi nilikuwa na hata wamehamia OS seva na seti ya nne USB vijiti katika md RAID1. Crazy. Mimi najua. Mimi si furaha sana kuhusu kasi. Niliamua kwenda nje na kununua mpya kuaminika ngumu kuendesha na kadi SATA upanuzi kwenda nayo.

server cha msingi Arch kizigeu ilikuwa kutumia kuhusu 7GB ya disk. chunk kubwa ya kwamba ilikuwa wabadilishane faili, cached data na vinginevyo miscellaneous au unnecessary files. Kwa ujumla ukubwa halisi wa OS, ikiwa ni pamoja na /nyumbani folder, ilikuwa tu kuhusu 2GB. Hii ilisababisha yangu kuangalia ndani ya super-haraka SSD kuendesha gari, kufikiri labda moja ndogo wanaweza kuwa hivyo gharama kubwa. Aligeuka kuwa gharama nafuu mashirika yasiyo ya SSD gari mimi naweza kupata kwa kweli gharama zaidi ya moja ya haya SSDs ndogo. Yay kwa ajili yangu. 🙂

Uchaguzi? Woah?!

Katika kuchagua OS, Ningependa tayari aliamua isingekuwa Arch. Kati ya mengine yote mgawanyo maarufu, Mimi nina zaidi ukoo na Ubuntu na CentOS. Fedora alikuwa pia uwezekano – lakini sikuwa umakini bado ni kuchukuliwa kwa seva. Ubuntu alishinda duru ya.

uamuzi ijayo mimi alikuwa na kufanya hawakuwa kutokea kwangu mpaka Kuenenea (Ufungaji wa Ubuntu mchawi) aliuliza ni wa kwangu: Jinsi ya kuanzisha partitions.

Nilikuwa mpya ya kutumia SSDs katika Linux – Mimi nina pamoja na ufahamu wa hasara za si kutumia yao kwa usahihi, zaidi kutokana na hatari ya longevity maskini kama vibaya.

Sikutaka kutumia ari byta kizigeu. Mimi mpango juu ya kuwaendeleza Motherboard seva / CPU / kumbukumbu si mbali sana katika siku zijazo. Kulingana na kwamba mimi niliamua kuweka byta katika faili byta juu ya uvamizi zilizopo MD. wabadilishane hautakuwa hasa kufunga lakini madhumuni yake itakuwa tu kwa ajili ya tukio nadra kwamba wakati kitu wamekwenda vibaya na kumbukumbu si inapatikana.

Hii basi kushoto kwangu kutoa mizizi njia 60GB kamili nje ya Intel 330 SSD. Nikaziangalia kutenganisha / nyumbani lakini alionekana tu kidogo pointless, aliyopewa jinsi kidogo ilitumika katika siku za nyuma. Mimi kwanza kuanzisha kizigeu na LVM – kitu Nimekuwa hivi karibuni wamekuwa wakifanya wakati mimi kuanzisha sanduku Linux (kweli, hakuna udhuru si kwa matumizi LVM). Wakati got sehemu ambapo napenda configure mfumo wa faili, Mimi clicked drop-down na instinctively kuchaguliwa ext4. Kisha mimi niliona btrfs katika orodha hiyo. Hutegemea!!

Lakini nini?

Btrfs (“siagi-EFF-ess”, “bora-EFF-ess”, “nyuki-mti-EFF-ess”, au chochote wewe dhana juu ya siku) ni mfumo wa faili jipya maendeleo ili kuleta Linux’ mfumo wa faili uwezo nyuma kufuatilia kwa sasa mfumo wa faili tech. Mfalme-ya-the-Hill zilizopo mfumo wa faili, “ext” (toleo la sasa kuitwa ext4) ni nzuri – lakini ni mdogo, kukwama katika dhana ya zamani (kufikiri ya bidhaa mpya F22 Raptor vs. an F4 Phantom na jaribio nusu-jested katika kuboresha equivalency) na kuna uwezekano wa kuwa na uwezo wa kushindana kwa muda mrefu sana na filesystems karibu zaidi Enterprise kama vile Oracle ZFS. Btrfs bado ina njia ndefu ya kwenda na bado ni kuchukuliwa majaribio (kutegemea ambaye kuuliza na kile unahitaji makala). Wengi wanaiona kuwa imara kwa ajili ya matumizi ya msingi – lakini hakuna ni kwenda kufanya dhamana yoyote. Na, bila shaka, kila mtu ni kusema ya kufanya mtihani na backups!

Mooooooo

tofauti ya msingi kati ya ext na btrfs ni kwamba btrfs ni “Ng'ombe” au “Nakala Andika” mfumo wa faili. Hii ina maana kwamba data ni kweli kamwe makusudi overwritten na internals mfumo wa faili ya. Kama wewe kuandika mabadiliko kwenye faili, btrfs kuandika mabadiliko yako na eneo mpya ya vyombo vya habari kimwili na update kuyatumia ndani kwa kutaja eneo mpya. Btrfs huenda hatua zaidi kwa kuwa wale kuyatumia ndani (inajulikana kama metadata) ni pia Ng'ombe. Wazee matoleo ya ext ingekuwa tu overwritten data. Ext4 atatumia Journal kuhakikisha kwamba rushwa si kutokea lazima kuziba AC kuwa yanked nje wakati wengi inopportune. Matokeo ya journal katika idadi sawa ya hatua zinazohitajika kwa update data. Na SSD, vifaa inavyotumia kazi sawa ng'ombe mchakato bila kujali filesystem unatumia. Hii ni kwa sababu SSD anatoa hawawezi kweli overwrite data – wana kunakili data (pamoja na mabadiliko yako) na eneo mpya na kisha kufuta block zamani kabisa. optimization katika eneo hili ni kwamba SSD wanaweza hata kufuta block zamani lakini badala tu kufanya kumbuka kufuta kuzuia kwa wakati mmoja baadaye wakati mambo si hivyo busy. Matokeo ya mwisho ni kwamba SSD anatoa fit vizuri sana na filesystem ng'ombe na si kufanya kama vizuri na filesystems mashirika yasiyo ya ng'ombe.

Ili kufanya mambo ya kuvutia, Ng'ombe katika mfumo wa faili urahisi huenda mkono kwa mkono na kipengele aitwaye deduplication. Hii inaruhusu mbili (au zaidi) vitalu kufanana ya data kuhifadhiwa kwa kutumia tu nakala moja, kuokoa nafasi. Pamoja na ng'ombe, kama faili deduplicated ni iliyopita, pacha tofauti hazitaathirika kama data faili iliyopita mapenzi vimeandikwa kwa kuzuia tofauti kimwili.

Ng'ombe kwa upande hufanya snapshotting rahisi kutekeleza. Wakati snapshot ni alifanya mfumo tu rekodi snapshot mpya kama kuwa kurudia ya data na metadata ndani ya kiasi. Pamoja na ng'ombe, mabadiliko yanapofanyika, data snapshot wa anakaa intact, na mtazamo thabiti wa hali ya mfumo wa faili kwa wakati snapshot lilifanywa vinaweza kuendelezwa.

rafiki mpya

Pamoja na hapo juu katika akili, hasa kama Ubuntu imefanya btrfs inapatikana kama chaguo-kufunga wakati, I figured itakuwa wakati mzuri wa kupiga mbizi katika btrfs na kuchunguza kidogo. 🙂

Sehemu 2 kuja hivi karibuni …

Kushiriki
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 faili.

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 (hapa 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 Server.
' 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 kwa UBound(MimeTypesToAddArray) Hatua ya 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 na 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 faili, 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
Kushiriki