Page 3 of 9 FirstFirst 12345 ... LastLast
Results 21 to 30 of 84

Thread: HOWTO: Backup all installed programs/packages

  1. #21
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    yes i usually use that if as it takes a lot less space. The point of this is say for example you have to install the packages on multiple computers, using this command since they're downloaded you only have to run them.

  2. #22
    Join Date
    Nov 2007
    Location
    NC, USA
    Beans
    829
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by abhiroopb View Post
    yes i usually use that if as it takes a lot less space. The point of this is say for example you have to install the packages on multiple computers, using this command since they're downloaded you only have to run them.
    Understandable. I just like my way better because I have a fast connection.
    Linux User #460341 || Ubuntu User #19510 || Unanswered Posts Team

  3. #23
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    Thats the beauty of linux, a million ways to do the same thing !

  4. #24
    Bruce M. is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by PinkFloyd102489 View Post
    Wouldnt it just be easier to do this?

    Code:
    To make the list:
    sudo dpkg --get-selections > installed-software
    
    To restore packages:
    sudo dpkg --set-selections < installed-software
    Thanks for this.
    I've made the list, nice.

    Quote Originally Posted by abhiroopb View Post
    yes i usually use that if as it takes a lot less space. The point of this is say for example you have to install the packages on multiple computers, using this command since they're downloaded you only have to run them.
    This is, of course, the plus side of things as I have a slow internet connection (128kbs), so it did take a while to get them (633.2 MB)

    Quote Originally Posted by PinkFloyd102489 View Post
    Understandable. I just like my way better because I have a fast connection.
    Quote Originally Posted by abhiroopb View Post
    Thats the beauty of linux, a million ways to do the same thing !
    And combined, I now have a list I can use to look up a file, and the files on a CD.

    Call that: 1,000,001 ways to do the same thing.


    Thanks to both of you.
    Have a nice day.
    Bruce

  5. #25
    Join Date
    Sep 2007
    Location
    Pteleos Greece
    Beans
    408
    Distro
    Ubuntu Development Release

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by PinkFloyd102489 View Post
    Wouldnt it just be easier to do this?

    Code:
    To make the list:
    sudo dpkg --get-selections > installed-software
    
    To restore packages:
    sudo dpkg --set-selections < installed-software
    This gives you the list of packages without all of the deb files. Mind that you'll need an internet connection, but most computers do.



    EDIT: installed-software is a file btw. It just acts as a list that you pipe back into the dpkg command so it will know what packages to download.
    i liked your method and i gave it a try, but ..

    i exported the list of files, i edited it and added 1 application that i don't have installed
    Code:
    2vcard						install
    and after that
    Code:
    sudo dpkg --set-selections < installed-software
    it is supposed to have 2vcard installed
    it does that automatically?? i tried sudo apt-get update && sudo apt-get upgrade but nothing happened
    2vcard yet not installed
    "Computers are like air conditioners, when you open WINDOW$ they stop working."
    Όσο ζώ μαθαίνω ...
    If Microsoft ever does applications for Linux it means I've won.
    Linus Torvalds

  6. #26
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    You can't edit the file and add something like that. Just recreate the file, it takes a couple of seconds.

  7. #27
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    IMPORTANT: I just discovered that using this command:

    Code:

    dpkg --get-selections > installed-software

    And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,

    Code:

    dpkg --set-selections < installed-software

    followed by

    Code:

    dselect

    DOES NOT install packages not in repos. So if you have used this to backup packages it will be no good installing say a .deb package you downloaded from getdeb. Keep this in mind. Mine however, should work fine.

  8. #28
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    Thank you abhiroopb for the very informative tutorial!

    I have one reservation about the method however, that I hope someone here will put to rest:

    If you run

    Code:
    sudo dpkg -i *.deb
    will it really install the debs in the correct order? I thought you would need a tool like apt-get to straighten out the dependency problems.




    EDIT: Please ignore the rest of this message. I've tried it -- and it does not work. Setting up apt-get and sources.list properly is more complicated than what I showed below.




    If that is true perhaps what we could do is

    edit /etc/apt/sources.list by adding something like
    Code:
    deb file://home/user/dpkg-repack gutsy universe multiverse restricted main security gutsy-backports
    (changing gutsy to hardy if that's the way you roll) then generate the list of packages with

    Code:
    % dpkg --get-selections | grep install | cut -f1 > installed-pkgs
    (if you didn't have the list already) and install them with
    Code:
    % sudo apt-get install `cat installed-pkgs`
    Last edited by unutbu; June 12th, 2008 at 12:23 AM.

  9. #29
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    I haven't tested it exactly, but from what I've heard dpkg is able to do it automatically installing first the packages that need to be installed. What exactly is the difference? I'm sorry I'm a bit confused with what your solution does?

  10. #30
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    Here is a little experiment I ran to test if dpkg is smart enough to resolve dependencies on its own.

    I've downloaded
    warsow_0.42-1~getdeb1_i386.deb
    warsow-data_0.42-1~getdeb1_all.deb

    from http://www.getdeb.net/app.php?name=Warsow.
    (This is a noble sacrifice in the name of science, mind you. I have no interest in warsow whatsoever except insofar as it shall help us explore the capabilities of dpkg. )

    Code:
    % dpkg --info warsow_0.42-1~getdeb1_i386.deb 
    <snip>
     Depends: libc6 (>= 2.6-1), libcurl3-gnutls (>= 7.16.2-1), libjpeg62, libkrb53 (>= 1.6.dfsg.1), libsdl1.2debian (>= 1.2.10-1), 
    libvorbisfile3 (>= 1.2.0), libx11-6, libxext6, libxinerama1, libxxf86dga1, libxxf86vm1, zlib1g (>= 1:1.2.3.3.dfsg-1), mesa-utils, xbase-clients, 
    warsow-data (= 0.42-1~getdeb1)
    <snip>

    Notice warsow-data is one of the packages upon which warsow depends.

    So what if I say

    sudo dpkg -i warsow_0.42-1~getdeb1_i386.deb?

    Will it install warsow-data first, or will it fail, complaining that warsow-data is not installed?

    Code:
    % sudo dpkg -i warsow_0.42-1~getdeb1_i386.deb
    Selecting previously deselected package warsow.
    (Reading database ... 169934 files and directories currently installed.)
    Unpacking warsow (from warsow_0.42-1~getdeb1_i386.deb) ...
    dpkg: dependency problems prevent configuration of warsow:
     warsow depends on warsow-data (= 0.42-1~getdeb1); however:
      Package warsow-data is not installed.
    dpkg: error processing warsow (--install):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     warsow
    This shows that dpkg is not smart enough to resolve dependencies.

    I then tried to set up sources.list so that apt-get could work with a local directory filled with debs.
    The reason why I tried to use apt-get to install the packages instead of dpkg is because I know apt-get is smart enough to resolve dependencies for me.

    I've never done that before and I've just found out its a bit more complicated than I made it out to be in my previous post.

    You need the right directory structure and a Package.gz file, a proper sources.list. I don't know how to do it... yet. Maybe a friendly neighborhood apt-wizard will be kind enough to show us the way...

Page 3 of 9 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •