From: "Алексей Шенцев" <ashen@nsrz.ru> To: ALT Linux Community general discussions <community@lists.altlinux.org> Subject: Re: [Comm] Восстановление списка пакетов Date: Wed, 24 Mar 2010 11:12:15 +0300 Message-ID: <4BA9C95F.7060707@nsrz.ru> (raw) In-Reply-To: <201003241032.23174.gusev.v.u@pkb.ru> [-- Attachment #1: Type: text/plain, Size: 1219 bytes --] 24.03.2010 10:32, Гусев В.Ю. пишет: > День добрый! > Бодрый! > Продумываю порядок восстановления компа после сбоя. > Все конфиги и данные у меня резервируются на удалённую машину. > Думаю, что для восстановления нужно будет после переустановки ОС накатить > пакеты по списку, а потом скопировать резервные конфиги и данные. > Подскажите, как можно снять список установленных пакетов, rpm -qa --qf='%{NAME}\n' > чтобы потом можно > было подать на вход apt-get install? > Команда "rpm -qa" выводит список вместе с версией, а нужно только имена > пакетов. > В рассылке это уже пробегало пару месяцев назад, но никак не могу найти то > сообщение... Уж простите. > И посмотри скрипт во вложении, может пригодится. [-- Attachment #2: autodownloadcache.sh --] [-- Type: text/plain, Size: 934 bytes --] #!/bin/sh #ÐÑиÑаем кÑÑ Ð¾Ñ ÑÑÑаÑевÑÐ¸Ñ Ñайлов пакеÑов apt-get autoclean #обновлÑем ÐРпо пакеÑам apt-get update #полÑÑаем ÑпиÑок ÑÑÑановленнÑÑ Ð² ÑиÑÑÐµÐ¼Ñ Ð¿Ð°ÐºÐµÑов rm -f /tmp/installrpm rpm -qa --qf='%{NAME}\n' | sort > /tmp/installrpm #полÑÑаем ÑпиÑок имеÑÑÐ¸Ñ Ð² кÑÑе Ñайлов пакеÑов в виде "ÑолÑко имена пакеÑов" rm -f /tmp/presentfiles cd /var/cache/apt/archives ls * | sort > /tmp/presentfiles rm -f /tmp/presentrpm cat /tmp/presentfiles | while read FILEPKG; do rpm -qp $FILEPKG --queryformat "%{NAME}\n" >> /tmp/presentrpm done comm -23 /tmp/installrpm /tmp/presentrpm > /tmp/dwrpm #докаÑиваем оÑÑÑÑÑÑвÑÑÑие в кÑÑе ÑÐ°Ð¹Ð»Ñ ÑÑÑановленнÑÑ Ð¿Ð°ÐºÐµÑов cat /tmp/dwrpm | while read PKG; do apt-get reinstall -d -y $PKG done #EOF
next prev parent reply other threads:[~2010-03-24 8:12 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-03-24 7:32 Гусев В.Ю. 2010-03-24 8:01 ` Andrew Borodin 2010-03-24 8:04 ` vx 8400 2010-03-24 8:10 ` Andrey Rahmatullin 2010-03-24 8:29 ` vx 8400 2010-03-24 9:23 ` Владимир 2010-03-25 5:53 ` Гусев В.Ю. 2010-03-25 7:17 ` REAL 2010-03-25 7:07 ` Andrey Rahmatullin 2010-03-25 13:53 ` Гусев В.Ю. 2010-03-24 8:07 ` Andrew Clark 2010-03-24 8:12 ` Алексей Шенцев [this message] 2010-03-24 8:31 ` Гусев В.Ю. 2010-03-24 8:34 ` vx 8400 2010-03-24 8:48 ` Алексей Шенцев 2010-03-24 8:59 ` [Comm] Восстановление спи ска пакетов Olexander Chernetskyy 2010-03-24 9:29 ` [Comm] Восстановление списка пакетов Andrey Rahmatullin 2010-03-24 9:40 ` Olexander Chernetskyy 2010-03-25 5:50 ` Гусев В.Ю. 2010-03-25 7:06 ` Andrey Rahmatullin 2010-03-25 10:49 ` Yura Kalinichenko 2010-03-25 10:51 ` Andrey Rahmatullin 2010-03-25 12:55 ` Yura Kalinichenko 2010-03-25 12:59 ` Алексей Шенцев 2010-03-25 12:59 ` Andrey Rahmatullin 2010-03-25 11:12 ` REAL 2010-03-25 11:22 ` Денис Смирнов 2010-03-25 11:26 ` Andrey Rahmatullin 2010-03-25 11:53 ` Алексей Шенцев 2010-03-25 11:56 ` Andrey Rahmatullin 2010-03-25 12:17 ` Денис Смирнов 2010-03-25 12:20 ` Andrew Borodin 2010-03-28 15:45 ` Stanislav Vlasov 2010-03-24 13:25 ` Денис Смирнов
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4BA9C95F.7060707@nsrz.ru \ --to=ashen@nsrz.ru \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git