Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 84

Thread: HOWTO: Backup all installed programs/packages

  1. #61
    Join Date
    Jul 2010
    Beans
    135

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by Black_Tanto View Post
    So, if I want to make a GUI program to do this for myself in the future, is there a tool where I can just enter the commands and tell it to execute them for me when I press a button?
    Since there are only three lines of commands that one enters to recreate the .deb packages and a one line command to re-install the packages, I did not search for a GUI program to automate this simple process. But there probably is someone in the Linux community that has done this already.

    Creating the .deb packages
    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`
    Re-Install
    Code:
    sudo dpkg -i *.deb

  2. #62
    Join Date
    Sep 2010
    Beans
    Hidden!

    Re: HOWTO: Backup all installed programs/packages

    The app I want to learn how to make would do several things, this being just one of them. I have never been good at remembering strings of code without it being written down somewhere. Im trying to speed up the human portions of certain tasks rather than the computer, since I am usually the bottle neck rather than my computer.

  3. #63
    Join Date
    Nov 2009
    Location
    dago
    Beans
    264
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HOWTO: Backup all installed programs/packages

    hello,

    good howto. an alternative to aptoncd.

    i got an error on installing dpkg-repack. the package libstdc can't be installed, it hangs at the last step of the installation. i solved by upgrading the package.

    thanks for sharing.

    i made the backup. if i want to remake it, say one month later, how to select only the packages that i install after the previous backup?
    it's better to ask stupid question than to do something stupid.

  4. #64
    Join Date
    Jan 2011
    Beans
    1

    Re: HOWTO: Backup all installed programs/packages

    I backed up all my softwares using this procedure told by abhiroop. It constitutes something like 6 gbs of them. Now after reinstallation of ubuntu on a new comp when i tried sudo dpkg -i *.deb It says that possible length exceeded or something like that. What should I do???
    I think the no. of softwares is huge (Its around 4000).
    So I tried
    sudo dpkg -i [abcdef]*.deb
    It tries to install all softwares starting with a,b,c,d,e,f but The problem of dependecy resolving occurs. I mean yeah there may be some softwares with dependencies starting with letters g, h or whatever.

    If I go like this for abcdefg and then next time hijklmn and so on, This process will always miss a lot of softwares.
    So it would be really difficult to figure out what has been installed and what not..

    (I am using UBUNTU 10.10 amd 64)
    Please help!!! Please...
    Last edited by fryle; January 11th, 2011 at 07:44 AM. Reason: Addition of configuration

  5. #65
    Join Date
    Nov 2009
    Beans
    186

    Re: HOWTO: Backup all installed programs/packages

    I think this will work for you, fryle. You can solve the issue of aptoncd not finding all your packages, and then use it to restore your installed packages instead of dpkg.

    The OP said
    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!
    But, if you use aptoncd in combination with the method described in the OP, you can get the benefits of aptoncd and still backup all your packages.

    Use the commands that were given in the OP to backup your packages:

    Code:
    $ sudo apt-get install dpkg-repack fakeroot
    $ mkdir ~/dpkg-repack; cd ~/dpkg-repack
    $ fakeroot -u dpkg-repack `dpkg --get-selections | grep -v deinstall | cut -f1`
    #Note that I use grep -v deinstall instead of grep install

    Now that you have a directory with all your packages, use aptoncd:

    Code:
    $ sudo apt-get install aptoncd
    $ aptoncd --cache-dir ~/dpkg-repack/
    Then use the aptoncd GUI to backup your packages to ISOs. Make sure metapackage is selected when you create the ISOs so that you can install everything at once (you'll see this option when you click the "Burn" button).

    After the ISOs have been created, mount one with the archive manager:
    Open Nautilus | Navigate to ISO | Right Click | Open with Archive Mounter

    Run the aptoncd-metapackage:
    Places | aptoncd | packages | aptoncd-metapackage

    That should work, but I want to put a disclaimer that I haven't personally restored packages this way.

  6. #66
    Join Date
    Nov 2009
    Beans
    3

    Re: HOWTO: Backup all installed programs/packages

    Quote Originally Posted by abhiroopb View Post
    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)
    Good Day Everybody.
    After finish backup my programs, I was open my backup folder.
    There is a lot of .deb file.
    For example I want to restore cairo-dock, I have found many .deb file name with cairo dock.

    cairo-dock_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_all.deb
    cairo-dock-core_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_i386.deb
    cairo-dock-data_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_all.deb
    cairo-dock-plug-ins_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_i386.deb
    cairo-dock-plug-ins-data_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_all.deb
    cairo-dock-plug-ins-integration_2.2.1~0alpha0-20101002-0ubuntu1~ppa0~lucid_i386.deb

    Which deb file I have to add for restoring cairo-dcok?
    Code:
    sudo dpkg -i *.deb
    ======================

    And the next one is I'm really love to use CLI.
    So I want to understand following command
    Code:
     sudo apt-get install dpkg-repack fakeroot
    I already know, sudo apt-get install and dpkg-repack is package name.
    But I don't know what is fakeroot

    I have search in
    Code:
    man dpkg-repack
    But I can not find about that.

    Please somebody explain for me.
    Thanks A Lot

  7. #67
    Join Date
    Jun 2010
    Beans
    49

    Re: HOWTO: Backup all installed programs/packages

    I think this method is also working well, even though it is taking a little time. 'coz a dumb noob like me could do it !

  8. #68
    Join Date
    Oct 2010
    Location
    India
    Beans
    432
    Distro
    Ubuntu Development Release

    Re: HOWTO: Backup all installed programs/packages

    thats great abhiroop...
    i am sure it will be a very useful tool to have a bckup like this and issue a single command for re-install !!!
    Ubuntu + Linux = UbunTux !!! Gr8 combo !!!

  9. #69
    Join Date
    Oct 2007
    Beans
    2

    Re: HOWTO: Backup all installed programs/packages

    is it possible to backup only certain programs instead of all of them?

  10. #70
    Join Date
    Mar 2009
    Beans
    1

    Red face Re: HOWTO: Backup all installed programs/packages

    Yeah this is an oldschool answer!

    But I have a newschool question!

    I just backed-up my debs using dpkg-repack... something seems to be fishy here... I checked the result of...
    Code:
    dpkg --get-selections | grep install | cut -f1
    ... there where 2574 line of package names... but when I check the result of...
    Code:
    ls
    ... there where 2564 line .deb files...!!!

    Please have a look at this... and tell me a little about it...

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