Page 8 of 9 FirstFirst ... 6789 LastLast
Results 71 to 80 of 84

Thread: HOWTO: Backup all installed programs/packages

  1. #71
    Join Date
    Sep 2005
    Location
    Benbrook Texas
    Beans
    767
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by abhiroopb View Post
    PROBLEM: Lets say you have set up your *buntu box. Now you want to backup all the installed deb files so that you can restore them quickly and efficiently.

    UPDATE: Why would you want this?
    When I was using windows I had a directory of EVERY Single program that I had downloaded. For one thing it would be easier to install everything as I would not have to go online and hunt for them. Further it would be useful where a computer does not have internet connection. In ubuntu "hunting" for programs is a rare occurrence thanks to the fantastic package managing system. However, I personally have about 20-30 programs that I have either compiled from source (using checkinstall, so that that a deb package is created and they are added to APT), or downloaded debs from obscure locations. Now each of these debs I will save in a directory so that in the future I do not have to go hunting for them. However, this command I have outlined backs up ALL packages, including the ones in the package manager. So, why would you want that?

    Firstly, this is VERY useful if lets say you have setup a very basic installation with all updates, and all non-free video/audio/etc codecs. Further you have installed some basic useful software. Now lets say you want to install the SAME setup on your grandmothers computer, except she does not have internet connection, or at the time you go to set it up she does not have a net connection. Using this script you can have all your debs in one simple location, so you will not have to redownload everything.

    Secondly, lets assume you work for a school, or a company, and you need to install the SAME ubuntu installation on 30 computers. Wouldn't it be easier to simply put all these debs in a central server and issue the dpkg -i *.deb command. This way you don't have to individually select the packages AND the packages don't have to download.

    Thirdly, (and this is purely personal) I like to be able to have all my installed packages at hand. This command doesn't take much effort, and for me it only requires 1.4 gb of space, so for a bit of piece of mind I can easily have all my packages on hand.

    There is no real reason to do this if you are already doing a full system backup (e.g. an image of your Ubuntu partition using partimage). This is just something I discovered and feel could be beneficial to other users.

    These commands will do that for you.

    Open a terminal and paste the following into it:

    Code:
    $ sudo apt-get install dpkg-repack fakeroot
    $ mkdir ~/dpkg-repack; cd ~/dpkg-repack
    $ fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`
    (the last command will take some time)

    Now if you scroll to your home folder, you should find a folder called "dpkg-repack" which should have all the deb files of all your installed packages.


    RE-INSTALL

    If you want to re-install the packages, navigate to the folder with the packages and input the following command in the terminal:
    Code:
    sudo dpkg -i *.deb
    Thanks to https://answers.launchpad.net/aptonc...n/15592/+index (Rafael)

    NB: I know AptonCD does this but what prompted me to use this method was that I had done the sudo apt-get clean command which had erased all the files in the /var/cache/apt directory, rendering AptonCD useless (as all it does is take the files from there and put it in the list). So I find this method is more efficient, and easier for me to control!
    Hi, this looks very interesting, so I followed the instructions and now have a folder called "dpkg-repack" in my home folder.

    However, when I try to re-install, I keep getting this result:-

    qwer@qwer-desktop:~$ sudo dpkg -i *.deb
    dpkg: error processing *.deb (--install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    *.deb
    qwer@qwer-desktop:~$

    I would really appreciate a suggestion here, as I am confused.

    TIA
    Lewis.

    ******

  2. #72
    Join Date
    May 2011
    Beans
    80
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Backup all installed programs/packages

    Hello Lewis,

    this is just a small mistake, you should enter into the path you created for the packages by:
    Code:
    cd ~/dpkg-repack
    just open your terminal and type that in, you should then get onto a prompt called:

    qwer@qwer-desktop:~/dpkg-repack$


    try an "ls" to verify if the .deb-packages are in there and if so just do the:

    Code:
    sudo dpkg -i *.deb
    again and you should be fine.

    Thanks to abhiroopb for this nice guide.
    Last edited by grubu; July 28th, 2011 at 09:21 AM.

  3. #73
    Join Date
    Sep 2011
    Beans
    27

    Re: HOWTO: Backup all installed programs/packages

    I just want to ask one question,

    does this tutorial require use of internet anywhere?! If I'm understanding it right it will recompile all the pkgs into resp deb files right?!

  4. #74
    Join Date
    Aug 2005
    Location
    Northern Michigan USA
    Beans
    2,033
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: HOWTO: Backup all installed programs/packages

    PinkFloyd where will the file be after I run the get selections?

  5. #75
    Join Date
    Dec 2011
    Beans
    12

    Re: HOWTO: Backup all installed programs/packages

    I'm wondering if all my personal settings are being saved too?

    - settings of widgets on screen etc
    - Settings of programs like Skype
    - Any manual created\edited setting-files like Unison profiles, etc..


    KR
    kamaradski

  6. #76
    Join Date
    Feb 2012
    Beans
    1

    Re: HOWTO: Backup all installed programs/packages

    Really helpful post , can i post on my blog for other readers to get this valueable info....

  7. #77
    Join Date
    Dec 2008
    Beans
    111

    Re: HOWTO: Backup all installed programs/packages

    Hi everybody!
    An information please: is it possible to put an option in dpck-repack in order not to overwrite already extracted .debs? Or, alternatively, to resume the process (it lasts 12h on a VAIO Dual 2.2Ghz 2GB RAM laptop, it will be useful in my modest opinion).
    Best regards!
    M.

  8. #78
    Join Date
    Sep 2011
    Beans
    52

    Re: HOWTO: Backup all installed programs/packages

    To late for me. I have already re-installed Ubuntu 12.04 after the failure upgrade from 10.04.

  9. #79
    Join Date
    Dec 2009
    Location
    Virginia, U.S.A
    Beans
    61
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Backup all installed programs/packages

    This sounds like a great and easy alternative to creating a custom Live CD/USB. This is something that will definitely be useful for reinstallation or installation on another machine.

  10. #80
    Join Date
    Jan 2011
    Beans
    123

    Re: HOWTO: Backup all installed programs/packages

    Hello, this is exactly what I was looking for. Could somebody please verify this still works with Ubuntu 12.10 (because it's an old thread).

    Thank you.
    64-Bit Ubuntu 12.04 (NEVER buy an HP laptop)

Page 8 of 9 FirstFirst ... 6789 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
  •