{"id":31792,"date":"2025-10-14T02:41:52","date_gmt":"2025-10-13T23:41:52","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=31792"},"modified":"2025-10-14T02:41:52","modified_gmt":"2025-10-13T23:41:52","slug":"logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/","title":{"rendered":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme"},"content":{"rendered":"<p><body><\/p>\n<h2>Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme<\/h2>\n<p>Sunucu y\u00f6netimi, \u00f6zellikle de uzun s\u00fcre \u00e7al\u0131\u015fan sistemler i\u00e7in, log dosyalar\u0131n\u0131n y\u00f6netimi kritik bir \u00f6neme sahiptir. Log dosyalar\u0131, sistemde olup biten her \u015feyi kaydederek sorun giderme, g\u00fcvenlik denetimi ve performans analizi i\u00e7in paha bi\u00e7ilmez veriler sunar. Ancak zamanla bu dosyalar disk alan\u0131n\u0131 t\u00fcketebilir ve sistem performans\u0131n\u0131 etkileyebilir. \u0130\u015fte bu noktada log dosyalar\u0131n\u0131 d\u00fczenli olarak d\u00f6nd\u00fcrmek (rotate), s\u0131k\u0131\u015ft\u0131rmak ve g\u00fcvenli bir \u015fekilde ar\u015fivlemek devreye girer.<\/p>\n<p>Bu rehberde, Ubuntu 16.04 i\u015fletim sistemi \u00fczerinde <code>logrotate<\/code> arac\u0131n\u0131 kullanarak log dosyalar\u0131n\u0131 d\u00fczenli olarak d\u00f6nd\u00fcrmeyi, s\u0131k\u0131\u015ft\u0131rmay\u0131 ve ard\u0131ndan <code>s3cmd<\/code> komut sat\u0131r\u0131 arac\u0131n\u0131 kullanarak bu loglar\u0131 Amazon S3 gibi nesne depolama hizmetlerine g\u00fcvenli bir \u015fekilde nas\u0131l ar\u015fivleyece\u011finizi ad\u0131m ad\u0131m a\u00e7\u0131klayaca\u011f\u0131z. Bu y\u00f6ntem, hem disk alan\u0131ndan tasarruf etmenizi hem de log verilerinizi uzun vadeli, maliyet etkin ve eri\u015filebilir bir \u015fekilde saklaman\u0131z\u0131 sa\u011flayacakt\u0131r.<\/p>\n<h3>Logrotate Nedir ve Nas\u0131l Yap\u0131land\u0131r\u0131l\u0131r?<\/h3>\n<p>Logrotate, Linux sistemlerinde log dosyalar\u0131n\u0131 otomatik olarak y\u00f6netmek i\u00e7in tasarlanm\u0131\u015f bir yard\u0131mc\u0131 programd\u0131r. Log dosyalar\u0131n\u0131 belirli boyutlara veya zaman aral\u0131klar\u0131na g\u00f6re d\u00f6nd\u00fcrebilir, s\u0131k\u0131\u015ft\u0131rabilir, yeni log dosyalar\u0131 olu\u015fturabilir ve eski log dosyalar\u0131n\u0131 silebilir.<\/p>\n<h4>Logrotate Temelleri<\/h4>\n<p>Logrotate, sisteminizde genellikle <code>\/etc\/logrotate.conf<\/code> ana yap\u0131land\u0131rma dosyas\u0131 ve <code>\/etc\/logrotate.d\/<\/code> dizinindeki uygulama \u00f6zelindeki yap\u0131land\u0131rma dosyalar\u0131 arac\u0131l\u0131\u011f\u0131yla \u00e7al\u0131\u015f\u0131r. <code>\/etc\/logrotate.d\/<\/code> dizinindeki her dosya, belirli bir uygulaman\u0131n (\u00f6rne\u011fin, Nginx, Apache, syslog) loglar\u0131n\u0131 y\u00f6netmek i\u00e7in \u00f6zel kurallar i\u00e7erir.<\/p>\n<p>Logrotate, varsay\u0131lan olarak g\u00fcnl\u00fck olarak bir cron i\u015fi arac\u0131l\u0131\u011f\u0131yla \u00e7al\u0131\u015ft\u0131r\u0131l\u0131r. Bu cron i\u015fi genellikle <code>\/etc\/cron.daily\/logrotate<\/code> i\u00e7inde tan\u0131ml\u0131d\u0131r.<\/p>\n<h4>Logrotate Yap\u0131land\u0131rmas\u0131 \u00d6rne\u011fi<\/h4>\n<p>\u00d6rnek olarak, bir web uygulamas\u0131n\u0131n \u00f6zel eri\u015fim loglar\u0131n\u0131 (\u00f6rne\u011fin <code>\/var\/log\/mywebapp\/access.log<\/code>) y\u00f6netmek istedi\u011fimizi varsayal\u0131m. \u00d6ncelikle <code>\/etc\/logrotate.d\/mywebapp<\/code> ad\u0131nda yeni bir dosya olu\u015ftural\u0131m:<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/logrotate.d\/mywebapp<\/code><\/pre>\n<p>\u0130\u00e7ine a\u015fa\u011f\u0131daki yap\u0131land\u0131rmay\u0131 ekleyin:<\/p>\n<pre><code class=\"language-\">\/var\/log\/mywebapp\/*.log {\n    daily\n    rotate 7\n    compress\n    delaycompress\n    missingok\n    notifempty\n    create 0640 www-data www-data\n    sharedscripts\n    postrotate\n        \/usr\/sbin\/invoke-rc.d nginx rotate > \/dev\/null 2>&1 || true\n    endscript\n}<\/code><\/pre>\n<p>Bu yap\u0131land\u0131rma dosyas\u0131ndaki y\u00f6nergeler \u015funlar\u0131 ifade eder:<\/p>\n<p><em>   <code>\/var\/log\/mywebapp\/<\/em>.log<\/code>: Bu kural\u0131n uygulanaca\u011f\u0131 log dosyalar\u0131n\u0131n yolu ve deseni.<br \/>\n*   <code>daily<\/code>: Loglar\u0131 g\u00fcnl\u00fck olarak d\u00f6nd\u00fcr. Di\u011fer se\u00e7enekler <code>weekly<\/code>, <code>monthly<\/code>, <code>yearly<\/code> olabilir.<br \/>\n*   <code>rotate 7<\/code>: En fazla 7 eski log dosyas\u0131n\u0131 sakla. Sekizinci d\u00f6nd\u00fcrmede en eski dosya silinir.<br \/>\n*   <code>compress<\/code>: D\u00f6nd\u00fcr\u00fclen log dosyalar\u0131n\u0131 s\u0131k\u0131\u015ft\u0131r (gzip kullanarak).<br \/>\n*   <code>delaycompress<\/code>: Log dosyas\u0131n\u0131n bir sonraki d\u00f6nd\u00fcrme d\u00f6ng\u00fcs\u00fcne kadar s\u0131k\u0131\u015ft\u0131rmay\u0131 ertele. Bu, baz\u0131 uygulamalar\u0131n hala a\u00e7\u0131k olan log dosyas\u0131na yazmaya devam etmesi durumunda faydal\u0131d\u0131r.<br \/>\n*   <code>missingok<\/code>: Log dosyas\u0131 bulunamazsa hata verme.<br \/>\n*   <code>notifempty<\/code>: Log dosyas\u0131 bo\u015fsa d\u00f6nd\u00fcrme.<br \/>\n*   <code>create 0640 www-data www-data<\/code>: Yeni bir log dosyas\u0131 olu\u015ftur ve belirtilen izinleri ve sahipli\u011fi ata.<br \/>\n*   <code>sharedscripts<\/code>: Birden fazla log dosyas\u0131 e\u015fle\u015fiyorsa, <code>postrotate<\/code> komutunu yaln\u0131zca bir kez \u00e7al\u0131\u015ft\u0131r.<br \/>\n*   <code>postrotate<\/code>\/<code>endscript<\/code>: Log dosyalar\u0131 d\u00f6nd\u00fcr\u00fcld\u00fckten sonra \u00e7al\u0131\u015ft\u0131r\u0131lacak komutlar\u0131 i\u00e7erir. Bu \u00f6rnekte, Nginx&#8217;e log dosyalar\u0131n\u0131 yeniden a\u00e7mas\u0131 i\u00e7in sinyal g\u00f6nderilir. Biz bu b\u00f6l\u00fcm\u00fc daha sonra S3cmd ile ar\u015fivleme i\u00e7in kullanaca\u011f\u0131z.<\/p>\n<p>Yap\u0131land\u0131rman\u0131z\u0131 test etmek i\u00e7in a\u015fa\u011f\u0131daki komutu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">sudo logrotate -d \/etc\/logrotate.d\/mywebapp<\/code><\/pre>\n<p>Bu komut, logrotate&#8217;un ne yapaca\u011f\u0131n\u0131 g\u00f6sterir ancak de\u011fi\u015fiklikleri uygulamaz. Ger\u00e7ek bir \u00e7al\u0131\u015ft\u0131rma i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">sudo logrotate -f \/etc\/logrotate.conf<\/code><\/pre>\n<p><strong>Not:<\/strong> <code>-f<\/code> (force) parametresi, logrotate&#8217;un normalde d\u00f6nd\u00fcrme ko\u015fullar\u0131 kar\u015f\u0131lanmasa bile d\u00f6nd\u00fcrmeyi zorlamas\u0131n\u0131 sa\u011flar. \u00dcretim ortam\u0131nda dikkatli kullan\u0131lmal\u0131d\u0131r.<\/p>\n<h3>S3cmd Kurulumu ve AWS S3 ile Entegrasyonu<\/h3>\n<p>S3cmd, Amazon S3 ve uyumlu di\u011fer nesne depolama hizmetleriyle komut sat\u0131r\u0131ndan etkile\u015fim kurman\u0131z\u0131 sa\u011flayan \u00fccretsiz, a\u00e7\u0131k kaynakl\u0131 bir ara\u00e7t\u0131r. Log dosyalar\u0131n\u0131 S3&#8217;e y\u00fcklemek i\u00e7in bunu kullanaca\u011f\u0131z.<\/p>\n<h4>S3cmd Kurulumu<\/h4>\n<p>Ubuntu 16.04 \u00fczerinde s3cmd kurulumu olduk\u00e7a basittir:<\/p>\n<pre><code class=\"language-bash\">sudo apt-get update\nsudo apt-get install s3cmd<\/code><\/pre>\n<h4>AWS S3 Bucket Olu\u015fturma ve IAM Kullan\u0131c\u0131s\u0131 Yap\u0131land\u0131rma<\/h4>\n<p>Loglar\u0131n\u0131z\u0131 depolamak i\u00e7in bir S3 bucket&#8217;\u0131na ihtiyac\u0131n\u0131z olacak. AWS Y\u00f6netim Konsolu&#8217;na giri\u015f yaparak yeni bir S3 bucket olu\u015fturabilirsiniz. Bucket isminin global olarak benzersiz olmas\u0131 gerekti\u011fini unutmay\u0131n (\u00f6rn: <code>my-server-logs-12345<\/code>).<\/p>\n<p>G\u00fcvenlik a\u00e7\u0131s\u0131ndan, S3&#8217;e eri\u015fim i\u00e7in tam yetkili bir AWS k\u00f6k kullan\u0131c\u0131s\u0131 yerine, sadece gerekli izinlere sahip bir IAM kullan\u0131c\u0131s\u0131 olu\u015fturman\u0131z \u015fiddetle tavsiye edilir.<\/p>\n<p>1.  <strong>IAM Kullan\u0131c\u0131s\u0131 Olu\u015fturma:<\/strong> AWS IAM Konsolu&#8217;na gidin, &#8220;Kullan\u0131c\u0131lar&#8221; b\u00f6l\u00fcm\u00fcnden &#8220;Yeni kullan\u0131c\u0131 ekle&#8221; se\u00e7ene\u011fini se\u00e7in. Kullan\u0131c\u0131ya bir isim verin (\u00f6rn: <code>logrotate-s3-user<\/code>) ve &#8220;Programatik eri\u015fim&#8221; se\u00e7ene\u011fini i\u015faretleyin.<br \/>\n2.  <strong>\u0130zinleri Ayarlama:<\/strong> Bir sonraki ad\u0131mda, kullan\u0131c\u0131ya S3 bucket&#8217;\u0131n\u0131za log dosyalar\u0131 y\u00fcklemesi i\u00e7in gerekli izinleri vermeniz gerekir. &#8220;Mevcut ilkeleri do\u011frudan ekle&#8221; se\u00e7ene\u011fini se\u00e7ip a\u015fa\u011f\u0131daki gibi \u00f6zel bir politika olu\u015fturabilirsiniz:<\/p>\n<pre><code class=\"language-json\">{\n        \"Version\": \"2012-10-17\",\n        \"Statement\": [\n            {\n                \"Effect\": \"Allow\",\n                \"Action\": [\n                    \"s3:PutObject\",\n                    \"s3:GetObject\",\n                    \"s3:DeleteObject\",\n                    \"s3:ListBucket\"\n                ],\n                \"Resource\": [\n                    \"arn:aws:s3:::your-log-bucket-name\",\n                    \"arn:aws:s3:::your-log-bucket-name\/*\"\n                ]\n            }\n        ]\n    }<\/code><\/pre>\n<p>    <code>your-log-bucket-name<\/code> yerine kendi bucket isminizi yazmay\u0131 unutmay\u0131n. Bu politika, kullan\u0131c\u0131n\u0131n belirtilen bucket&#8217;a nesne koymas\u0131na, almas\u0131na, silmesine ve bucket i\u00e7eri\u011fini listelemesine izin verir.<br \/>\n3.  <strong>Eri\u015fim Anahtarlar\u0131:<\/strong> Kullan\u0131c\u0131 olu\u015fturulduktan sonra size bir &#8220;Eri\u015fim Anahtar\u0131 Kimli\u011fi&#8221; (Access Key ID) ve bir &#8220;Gizli Eri\u015fim Anahtar\u0131&#8221; (Secret Access Key) verilecektir. Bu anahtarlar\u0131 g\u00fcvenli bir yere kaydedin, \u00e7\u00fcnk\u00fc bir daha g\u00f6sterilmeyeceklerdir.<\/p>\n<h4>S3cmd Yap\u0131land\u0131rmas\u0131<\/h4>\n<p>S3cmd&#8217;yi ilk kez \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131zda, yap\u0131land\u0131rma sihirbaz\u0131 otomatik olarak ba\u015flar:<\/p>\n<pre><code class=\"language-bash\">s3cmd --configure<\/code><\/pre>\n<p>Sihirbaz sizden a\u015fa\u011f\u0131daki bilgileri isteyecektir:<\/p>\n<p>*   <code>Access Key<\/code>: IAM kullan\u0131c\u0131n\u0131z\u0131n Eri\u015fim Anahtar\u0131 Kimli\u011fi.<br \/>\n*   <code>Secret Key<\/code>: IAM kullan\u0131c\u0131n\u0131z\u0131n Gizli Eri\u015fim Anahtar\u0131.<br \/>\n*   <code>Default Region<\/code>: S3 bucket&#8217;\u0131n\u0131z\u0131n bulundu\u011fu AWS b\u00f6lgesi (\u00f6rn: <code>eu-central-1<\/code> veya <code>us-east-1<\/code>).<br \/>\n*   <code>Encryption password<\/code>: \u0130ste\u011fe ba\u011fl\u0131, loglar\u0131 yerel olarak \u015fifrelemek isterseniz kullanabilirsiniz. Bo\u015f b\u0131rak\u0131labilir.<br \/>\n*   <code>Path to GPG program<\/code>: \u0130ste\u011fe ba\u011fl\u0131, bo\u015f b\u0131rak\u0131labilir.<br \/>\n*   <code>Use HTTPS protocol<\/code>: <code>Yes<\/code> olarak b\u0131rak\u0131n.<br \/>\n*   <code>HTTP Proxy server name<\/code>: Proxy kullan\u0131yorsan\u0131z girin, aksi takdirde bo\u015f b\u0131rak\u0131n.<\/p>\n<p>Yap\u0131land\u0131rma tamamland\u0131\u011f\u0131nda, bilgiler <code>\/home\/kullan\u0131c\u0131_ad\u0131n\u0131z\/.s3cfg<\/code> dosyas\u0131na kaydedilir. Bu dosyan\u0131n izinlerini <code>600<\/code> olarak ayarlamak \u00f6nemlidir:<\/p>\n<pre><code class=\"language-bash\">chmod 660 ~\/.s3cfg<\/code><\/pre>\n<p>Bu, di\u011fer kullan\u0131c\u0131lar\u0131n hassas anahtarlar\u0131n\u0131z\u0131 g\u00f6rmesini engeller.<\/p>\n<h4>S3cmd Test Etme<\/h4>\n<p>S3cmd&#8217;nin S3 bucket&#8217;\u0131n\u0131za eri\u015febildi\u011fini do\u011frulamak i\u00e7in a\u015fa\u011f\u0131daki komutu kullan\u0131n:<\/p>\n<pre><code class=\"language-bash\">s3cmd ls s3:\/\/your-log-bucket-name\/<\/code><\/pre>\n<p>E\u011fer bucket i\u00e7eri\u011fi listelenirse veya bo\u015f bir \u00e7\u0131kt\u0131 al\u0131rsan\u0131z, yap\u0131land\u0131rma ba\u015far\u0131l\u0131 demektir. Bir dosya y\u00fckleyerek de test edebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">echo \"Test dosyas\u0131\" > test.txt\ns3cmd put test.txt s3:\/\/your-log-bucket-name\/test.txt\ns3cmd ls s3:\/\/your-log-bucket-name\/<\/code><\/pre>\n<p>Ard\u0131ndan test dosyas\u0131n\u0131 silebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">s3cmd del s3:\/\/your-log-bucket-name\/test.txt\nrm test.txt<\/code><\/pre>\n<h3>Logrotate ve S3cmd&#8217;yi Birle\u015ftirme: Loglar\u0131 S3&#8217;e Ar\u015fivleme<\/h3>\n<p>\u015eimdi s\u0131ra geldi logrotate&#8217;un loglar\u0131 d\u00f6nd\u00fcrd\u00fckten sonra S3cmd kullanarak bu loglar\u0131 S3&#8217;e y\u00fcklemesine. Bunun i\u00e7in logrotate yap\u0131land\u0131rma dosyam\u0131zdaki <code>postrotate<\/code> b\u00f6l\u00fcm\u00fcn\u00fc de\u011fi\u015ftirece\u011fiz.<\/p>\n<h4>Logrotate Yap\u0131land\u0131rmas\u0131n\u0131 G\u00fcncelleme<\/h4>\n<p><code>\/etc\/logrotate.d\/mywebapp<\/code> dosyas\u0131n\u0131 tekrar a\u00e7\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/logrotate.d\/mywebapp<\/code><\/pre>\n<p><code>postrotate<\/code> b\u00f6l\u00fcm\u00fcn\u00fc a\u015fa\u011f\u0131daki gibi g\u00fcncelleyin:<\/p>\n<pre><code class=\"language-\">\/var\/log\/mywebapp\/*.log {\n    daily\n    rotate 7\n    compress\n    delaycompress\n    missingok\n    notifempty\n    create 0640 www-data www-data\n    sharedscripts\n    postrotate\n        # D\u00f6nd\u00fcr\u00fclen ve s\u0131k\u0131\u015ft\u0131r\u0131lan log dosyas\u0131n\u0131 bul\n        # Logrotate'un \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131 kullan\u0131c\u0131n\u0131n (genellikle root) s3cmd'yi bulabilmesi i\u00e7in tam yolu belirtin\n        # S3cmd yap\u0131land\u0131rma dosyas\u0131n\u0131n yolunu belirtin, aksi takdirde varsay\u0131lan\u0131 (~\/.s3cfg) arar.\n        # Root kullan\u0131c\u0131s\u0131 i\u00e7in \/root\/.s3cfg veya \/etc\/.s3cfg gibi bir yer olabilir.\n        # Bu \u00f6rnekte, s3cmd'nin global olarak kurulu oldu\u011funu ve root'un PATH'inde oldu\u011funu varsay\u0131yoruz.\n        # E\u011fer s3cmd yap\u0131land\u0131rmas\u0131n\u0131 root kullan\u0131c\u0131s\u0131 i\u00e7in yapmad\u0131ysan\u0131z, --config=\/path\/to\/.s3cfg kullan\u0131n.\n        \n        LOG_FILE=$(ls -t \/var\/log\/mywebapp\/*.log.gz | head -1) # En son s\u0131k\u0131\u015ft\u0131r\u0131lan log dosyas\u0131n\u0131 bulur\n        BUCKET_NAME=\"your-log-bucket-name\"\n        S3_PATH=\"mywebapp\/$(date +\\%Y\/\\%m\/\\%d)\/$(basename ${LOG_FILE})\" # S3'te y\u0131l\/ay\/g\u00fcn\/logad\u0131.gz yap\u0131s\u0131\n\n        if [ -f \"${LOG_FILE}\" ]; then\n            echo \"Uploading ${LOG_FILE} to s3:\/\/${BUCKET_NAME}\/${S3_PATH}\"\n            \/usr\/bin\/s3cmd put \"${LOG_FILE}\" \"s3:\/\/${BUCKET_NAME}\/${S3_PATH}\" --config=\/root\/.s3cfg\n\n            if [ $? -eq 0 ]; then\n                echo \"Upload successful, deleting local file ${LOG_FILE}\"\n                rm \"${LOG_FILE}\"\n            else\n                echo \"Upload failed for ${LOG_FILE}\"\n            fi\n        else\n            echo \"No compressed log file found to upload.\"\n        fi\n\n        \/usr\/sbin\/invoke-rc.d nginx rotate > \/dev\/null 2>&1 || true # Uygulamaya sinyal g\u00f6nderme\n    endscript\n}<\/code><\/pre>\n<p><strong>\u00d6nemli Notlar:<\/strong><\/p>\n<p>*   <strong>S3cmd Yap\u0131land\u0131rma Dosyas\u0131 Konumu:<\/strong> <code>logrotate<\/code> genellikle <code>root<\/code> kullan\u0131c\u0131s\u0131 alt\u0131nda \u00e7al\u0131\u015f\u0131r. Bu nedenle, <code>s3cmd --configure<\/code> komutunu <code>sudo s3cmd --configure<\/code> olarak veya <code>root<\/code> kullan\u0131c\u0131s\u0131 olarak \u00e7al\u0131\u015ft\u0131rarak <code>\/root\/.s3cfg<\/code> dosyas\u0131na yap\u0131land\u0131rmay\u0131 kaydetmeniz gerekecektir. Aksi takdirde, <code>s3cmd put<\/code> komutunda <code>--config=\/path\/to\/your\/user\/.s3cfg<\/code> parametresini kullanarak do\u011fru yap\u0131land\u0131rma dosyas\u0131n\u0131 belirtmelisiniz. Genellikle <code>\/root\/.s3cfg<\/code> kullanmak en kolay yoldur.<br \/>\n<em>   <strong>Log Dosyas\u0131 Tespiti:<\/strong> <code>LOG_FILE=$(ls -t \/var\/log\/mywebapp\/<\/em>.log.gz | head -1)<\/code> komutu, <code>\/var\/log\/mywebapp\/<\/code> dizinindeki en son de\u011fi\u015ftirilmi\u015f <code>.log.gz<\/code> dosyas\u0131n\u0131 bulur. Bu, <code>delaycompress<\/code> kulland\u0131\u011f\u0131m\u0131zda do\u011fru dosyay\u0131 bulmak i\u00e7in \u00f6nemlidir.<br \/>\n*   <strong>S3 Yolu:<\/strong> <code>S3_PATH<\/code> de\u011fi\u015fkeni, S3 bucket&#8217;\u0131n\u0131z i\u00e7inde loglar\u0131 d\u00fczenli bir \u015fekilde depolaman\u0131z\u0131 sa\u011flar (\u00f6rn: <code>mywebapp\/2023\/10\/26\/access.log-20231025.gz<\/code>).<br \/>\n*   <strong>Hata Kontrol\u00fc ve Silme:<\/strong> <code>if [ $? -eq 0 ]; then rm \"${LOG_FILE}\"; fi<\/code> sat\u0131r\u0131, S3&#8217;e y\u00fckleme ba\u015far\u0131l\u0131 olursa yerel log dosyas\u0131n\u0131 siler. Bu, gereksiz disk kullan\u0131m\u0131n\u0131 \u00f6nler. Y\u00fckleme ba\u015far\u0131s\u0131z olursa, dosya yerelde kal\u0131r, bu da manuel inceleme veya yeniden deneme i\u00e7in bir f\u0131rsat sunar.<br \/>\n*   <strong>Uygulama Sinyali:<\/strong> <code>postrotate<\/code> i\u00e7inde hala uygulaman\u0131z\u0131n log dosyalar\u0131n\u0131 yeniden a\u00e7mas\u0131n\u0131 sa\u011flayacak komutlar\u0131 tutman\u0131z \u00f6nemlidir (\u00f6rn: <code>invoke-rc.d nginx rotate<\/code>).<\/p>\n<p>Bu yap\u0131land\u0131rma ile, logrotate g\u00fcnl\u00fck olarak \u00e7al\u0131\u015facak, eski log dosyas\u0131n\u0131 s\u0131k\u0131\u015ft\u0131racak, yeni bir bo\u015f log dosyas\u0131 olu\u015fturacak ve s\u0131k\u0131\u015ft\u0131r\u0131lm\u0131\u015f eski log dosyas\u0131n\u0131 S3 bucket&#8217;\u0131n\u0131za y\u00fckleyecektir. Y\u00fckleme ba\u015far\u0131l\u0131 olursa, yerel s\u0131k\u0131\u015ft\u0131r\u0131lm\u0131\u015f dosya silinecektir.<\/p>\n<h3>Geli\u015fmi\u015f Kullan\u0131m ve En \u0130yi Uygulamalar<\/h3>\n<p>Loglar\u0131 nesne depolamaya ar\u015fivlerken dikkate alman\u0131z gereken baz\u0131 geli\u015fmi\u015f konular ve en iyi uygulamalar \u015funlard\u0131r:<\/p>\n<h4>G\u00fcvenlik<\/h4>\n<p>*   <strong>IAM Politikalar\u0131:<\/strong> Daima en az ayr\u0131cal\u0131k (least privilege) prensibini uygulay\u0131n. IAM kullan\u0131c\u0131n\u0131za sadece loglar\u0131 y\u00fcklemek ve y\u00f6netmek i\u00e7in gerekli olan minimum S3 izinlerini verin.<br \/>\n*   <strong>S3 Nesne \u015eifrelemesi:<\/strong> Hassas log verileri i\u00e7eriyorsa, S3&#8217;e y\u00fcklenen nesneleri \u015fifrelemeyi d\u00fc\u015f\u00fcn\u00fcn. Bunu S3 bucket politikalar\u0131 arac\u0131l\u0131\u011f\u0131yla sunucu taraf\u0131 \u015fifrelemeyi zorlayarak veya <code>s3cmd put<\/code> komutuna <code>--encrypt<\/code> parametresini ekleyerek yapabilirsiniz.<br \/>\n*   <strong><code>.s3cfg<\/code> Dosya \u0130zinleri:<\/strong> <code>.s3cfg<\/code> dosyas\u0131n\u0131n yaln\u0131zca root kullan\u0131c\u0131s\u0131 taraf\u0131ndan okunabilir oldu\u011fundan emin olun (<code>chmod 600 \/root\/.s3cfg<\/code>).<\/p>\n<h4>Maliyet Y\u00f6netimi<\/h4>\n<p>*   <strong>S3 Ya\u015fam D\u00f6ng\u00fcs\u00fc Kurallar\u0131 (Lifecycle Rules):<\/strong> AWS S3, belirli bir s\u00fcre sonra nesneleri daha ucuz depolama s\u0131n\u0131flar\u0131na (\u00f6rne\u011fin, S3 Standard-IA, S3 Glacier) otomatik olarak ta\u015f\u0131mak veya tamamen silmek i\u00e7in ya\u015fam d\u00f6ng\u00fcs\u00fc kurallar\u0131 tan\u0131mlaman\u0131za olanak tan\u0131r. Bu, uzun vadede depolama maliyetlerinizi \u00f6nemli \u00f6l\u00e7\u00fcde azaltabilir.<br \/>\n*   <strong>S3 Depolama S\u0131n\u0131flar\u0131:<\/strong> Log verilerinizin eri\u015fim s\u0131kl\u0131\u011f\u0131na g\u00f6re uygun depolama s\u0131n\u0131f\u0131n\u0131 se\u00e7in. Nadiren eri\u015filen loglar i\u00e7in S3 Standard-IA veya S3 Glacier daha uygun maliyetli olabilir.<\/p>\n<h4>\u0130zleme ve Hata Ay\u0131klama<\/h4>\n<p>*   <strong>Logrotate Durum Dosyas\u0131:<\/strong> Logrotate&#8217;un en son ne zaman \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 ve hangi dosyalar\u0131 d\u00f6nd\u00fcrd\u00fc\u011f\u00fcn\u00fc <code>\/var\/lib\/logrotate\/status<\/code> dosyas\u0131ndan kontrol edebilirsiniz.<br \/>\n*   <strong>Cron Job \u00c7\u0131kt\u0131s\u0131:<\/strong> <code>logrotate<\/code> bir cron i\u015fi olarak \u00e7al\u0131\u015ft\u0131\u011f\u0131 i\u00e7in, <code>postrotate<\/code> beti\u011finizdeki <code>echo<\/code> komutlar\u0131n\u0131n \u00e7\u0131kt\u0131s\u0131 cron&#8217;un varsay\u0131lan e-posta adresine g\u00f6nderilebilir (e\u011fer yap\u0131land\u0131r\u0131lm\u0131\u015fsa) veya <code>\/var\/log\/syslog<\/code> gibi sistem loglar\u0131nda g\u00f6r\u00fcnebilir. Hata ay\u0131klama i\u00e7in bu \u00e7\u0131kt\u0131lar\u0131 kontrol etmek \u00f6nemlidir.<br \/>\n*   <strong>Manuel \u00c7al\u0131\u015ft\u0131rma:<\/strong> Hata ay\u0131klama yaparken, <code>sudo logrotate -f \/etc\/logrotate.conf<\/code> komutunu \u00e7al\u0131\u015ft\u0131rarak logrotate&#8217;u ve dolay\u0131s\u0131yla <code>postrotate<\/code> beti\u011fini manuel olarak tetikleyebilirsiniz.<\/p>\n<h4>Alternatifler ve Di\u011fer Nesne Depolama Hizmetleri<\/h4>\n<p>*   <strong>AWS CLI:<\/strong> S3cmd&#8217;ye bir alternatif olarak AWS&#8217;nin resmi komut sat\u0131r\u0131 aray\u00fcz\u00fc (AWS CLI) kullan\u0131labilir. Daha kapsaml\u0131 \u00f6zellikler sunar ancak kurulumu ve yap\u0131land\u0131rmas\u0131 biraz daha karma\u015f\u0131k olabilir.<br \/>\n*   <strong>Di\u011fer Nesne Depolama Sa\u011flay\u0131c\u0131lar\u0131:<\/strong> Bu rehber AWS S3&#8217;e odaklanm\u0131\u015f olsa da, <code>s3cmd<\/code> MinIO gibi S3 API uyumlu di\u011fer nesne depolama \u00e7\u00f6z\u00fcmleriyle de \u00e7al\u0131\u015fabilir. Google Cloud Storage veya Azure Blob Storage gibi di\u011fer bulut sa\u011flay\u0131c\u0131lar\u0131 i\u00e7in kendi komut sat\u0131r\u0131 ara\u00e7lar\u0131n\u0131 kullanman\u0131z gerekir.<\/p>\n<h3>Sonu\u00e7 ve SSS<\/h3>\n<p>Bu rehberde, Ubuntu 16.04 \u00fczerinde <code>logrotate<\/code> ve <code>s3cmd<\/code> kullanarak log dosyalar\u0131n\u0131z\u0131 otomatik olarak d\u00f6nd\u00fcrme, s\u0131k\u0131\u015ft\u0131rma ve Amazon S3 gibi nesne depolama hizmetlerine g\u00fcvenli bir \u015fekilde ar\u015fivleme s\u00fcrecini detayl\u0131ca ele ald\u0131k. Bu entegrasyon, sunucunuzun disk alan\u0131n\u0131 verimli kullan\u0131rken, de\u011ferli log verilerinizi uzun vadeli, g\u00fcvenli ve maliyet etkin bir \u015fekilde saklaman\u0131z\u0131 sa\u011flar. Otomatik ar\u015fivleme, manuel m\u00fcdahaleyi azalt\u0131r ve operasyonel verimlili\u011fi art\u0131r\u0131r.<\/p>\n<h4>S\u0131k\u00e7a Sorulan Sorular (SSS)<\/h4>\n<p><strong>S: Logrotate neden \u00e7al\u0131\u015fm\u0131yor veya loglar\u0131 S3&#8217;e y\u00fcklemiyor?<\/strong><br \/>\n<strong>C:<\/strong> Birka\u00e7 olas\u0131 neden olabilir:<br \/>\n*   Logrotate&#8217;un cron i\u015fi \u00e7al\u0131\u015fm\u0131yor olabilir. <code>\/etc\/cron.daily\/logrotate<\/code> dosyas\u0131n\u0131n \u00e7al\u0131\u015ft\u0131r\u0131labilir oldu\u011fundan ve cron&#8217;un do\u011fru \u015fekilde yap\u0131land\u0131r\u0131ld\u0131\u011f\u0131ndan emin olun.<br \/>\n*   Logrotate yap\u0131land\u0131rma dosyas\u0131nda (\u00f6rn. <code>\/etc\/logrotate.d\/mywebapp<\/code>) s\u00f6zdizimi hatas\u0131 olabilir. <code>sudo logrotate -d \/etc\/logrotate.d\/mywebapp<\/code> ile test edin.<br \/>\n*   <code>postrotate<\/code> beti\u011findeki <code>s3cmd<\/code> komutu do\u011fru yolu bulam\u0131yor veya yetkilendirme sorunlar\u0131 ya\u015f\u0131yor olabilir. <code>s3cmd<\/code>&#8216;nin <code>root<\/code> kullan\u0131c\u0131s\u0131 i\u00e7in yap\u0131land\u0131r\u0131ld\u0131\u011f\u0131ndan (<code>\/root\/.s3cfg<\/code>) veya <code>--config<\/code> parametresinin do\u011fru yolu g\u00f6sterdi\u011finden emin olun.<br \/>\n*   IAM kullan\u0131c\u0131n\u0131z\u0131n S3 bucket&#8217;\u0131na y\u00fckleme izinleri olmayabilir. IAM politikas\u0131n\u0131 kontrol edin.<br \/>\n<em>   Log dosyas\u0131 deseni (<code>\/var\/log\/mywebapp\/<\/em>.log<\/code>) do\u011fru de\u011filse, logrotate dosyalar\u0131 bulamaz.<\/p>\n<p><strong>S: S3cmd yetkilendirme hatas\u0131 veriyor, ne yapmal\u0131y\u0131m?<\/strong><br \/>\n<strong>C:<\/strong> Bu genellikle yanl\u0131\u015f veya eksik Access Key\/Secret Key veya yanl\u0131\u015f IAM izinlerinden kaynaklan\u0131r.<br \/>\n*   <code>\/root\/.s3cfg<\/code> dosyas\u0131ndaki anahtarlar\u0131n do\u011fru oldu\u011fundan emin olun.<br \/>\n*   IAM kullan\u0131c\u0131n\u0131z\u0131n S3 bucket&#8217;\u0131na <code>PutObject<\/code> ve <code>ListBucket<\/code> izinleri oldu\u011fundan emin olun.<br \/>\n*   <code>s3cmd --configure<\/code> komutunu <code>sudo<\/code> ile \u00e7al\u0131\u015ft\u0131rarak yap\u0131land\u0131rmay\u0131 yeniden yapmay\u0131 deneyin.<\/p>\n<p><strong>S: Loglar\u0131 S3&#8217;ten geri nas\u0131l al\u0131r\u0131m?<\/strong><br \/>\n<strong>C:<\/strong> <code>s3cmd get<\/code> komutunu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">s3cmd get s3:\/\/your-log-bucket-name\/mywebapp\/2023\/10\/26\/access.log-20231025.gz .\/<\/code><\/pre>\n<p>Bu komut, belirtilen log dosyas\u0131n\u0131 mevcut dizine indirir.<\/p>\n<p><strong>S: Loglar\u0131 yerelde silmek g\u00fcvenli mi?<\/strong><br \/>\n<strong>C:<\/strong> Evet, loglar\u0131 S3&#8217;e ba\u015far\u0131yla y\u00fcklendikten sonra yerelde silmek genellikle g\u00fcvenlidir, \u00e7\u00fcnk\u00fc S3 y\u00fcksek dayan\u0131kl\u0131l\u0131k ve eri\u015filebilirlik sunar. Ancak, i\u015fletmenizin veya uygulaman\u0131z\u0131n belirli gereksinimleri varsa (\u00f6rne\u011fin, yerel eri\u015fim i\u00e7in k\u0131sa bir s\u00fcre tutma), <code>rm<\/code> komutunu <code>postrotate<\/code> beti\u011finden kald\u0131rabilir veya belirli bir s\u00fcre sonra silmek i\u00e7in ayr\u0131 bir cron i\u015fi kullanabilirsiniz.<\/p>\n<p><strong>S: Ubuntu 16.04 yerine ba\u015fka bir versiyon kullanabilir miyim?<\/strong><br \/>\n<strong>C:<\/strong> Evet, bu rehberdeki temel ad\u0131mlar Ubuntu&#8217;nun di\u011fer s\u00fcr\u00fcmleri (\u00f6rn. 18.04, 20.04, 22.04) ve hatta di\u011fer Debian tabanl\u0131 Linux da\u011f\u0131t\u0131mlar\u0131 i\u00e7in de ge\u00e7erlidir. Paket isimleri ve baz\u0131 dosya yollar\u0131 k\u00fc\u00e7\u00fck farkl\u0131l\u0131klar g\u00f6sterebilir, ancak genel mant\u0131k ayn\u0131 kalacakt\u0131r.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme\nSunucu y\u00f6netimi, \u00f6zellikle de uzun s\u00fcre \u00e7al\u0131\u015fan sistemler","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1468],"tags":[],"class_list":{"0":"post-31792","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ubuntu","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme\" \/>\n<meta property=\"og:description\" content=\"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme Sunucu y\u00f6netimi, \u00f6zellikle de uzun s\u00fcre \u00e7al\u0131\u015fan sistemler\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-13T23:41:52+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme\",\"datePublished\":\"2025-10-13T23:41:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\"},\"wordCount\":2244,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Ubuntu\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\",\"name\":\"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-10-13T23:41:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/","og_locale":"tr_TR","og_type":"article","og_title":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme","og_description":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme Sunucu y\u00f6netimi, \u00f6zellikle de uzun s\u00fcre \u00e7al\u0131\u015fan sistemler","og_url":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-10-13T23:41:52+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"14 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme","datePublished":"2025-10-13T23:41:52+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/"},"wordCount":2244,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Ubuntu"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/","url":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/","name":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-10-13T23:41:52+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/logrotate-ve-s3cmd-ile-loglari-ubuntu-16-04-uzerinde-nesne-depolamaya-arsivleme\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Logrotate ve S3cmd ile Loglar\u0131 Ubuntu 16.04 \u00dczerinde Nesne Depolamaya Ar\u015fivleme"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/31792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=31792"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/31792\/revisions"}],"predecessor-version":[{"id":31793,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/31792\/revisions\/31793"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=31792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=31792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=31792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}