Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 84

Thread: HOWTO: Backup all installed programs/packages

  1. #31
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    APT-wizard Capink has provided us with the solution: http://ubuntuforums.org/showpost.php...24&postcount=3!

    In the commands below, change engine to your username, and
    change /home/engine/dpkg-repack to the directory where you keep your debs.

    Code:
    export private=/home/engine/dpkg-repack
    echo $private /home/engine/dpkg-repack
    apt-ftparchive packages ${private} > ${private}/Packages
    sed  --in-place 's_Filename: '${private}'/_Filename: _' ${private}/Packages
    gzip -9c "${private}/Packages" > ${private}/Packages.gz
    gksu gedit /etc/apt/sources.list
    Add to the bottom:
    Code:
    deb file:///home/engine/dpkg-repack ./
    Code:
    sudo apt-get update
    You will now be able to use your dpkg-repack directory just like any other official or unofficial repository. You'll be able to use Synaptic or apt-get, for example.

    Instead of

    Code:
    sudo dpkg -i *.deb
    you can now

    Code:
    sudo apt-get install `cat installed-pkgs`
    to install all .debs from your local repository and apt-get will install them all in an order which handles dependencies correctly and automatically.
    Last edited by unutbu; June 12th, 2008 at 01:31 AM.

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

    Re: HOWTO: Backup all installed programs/packages

    Ok I think the mistake you made was this:
    Code:
    sudo dpkg -i warsow_0.42-1~getdeb1_i386.deb
    No expert but this is basically telling dpkg to install warsow first. What I suggested was you do:
    Code:
    sudo dpkg -i *.deb
    For whatever reason I think this scans the directory. Alphabetically warsow-data is lined up first so a better test may be needed. Now this isn't the best test, perhaps if you point me towards a prgoram that has a lot of smaller dependencies we can run a more thorough test.

    Here is the output:
    Code:
    abhiroop@Vanimo:~/MyDownloads/New Folder$ sudo dpkg -i *.deb
    Selecting previously deselected package warsow.
    (Reading database ... 134783 files and directories currently installed.)
    Unpacking warsow (from warsow_0.31.dfsg-6_i386.deb) ...
    Selecting previously deselected package warsow-data.
    Unpacking warsow-data (from warsow-data_0.31-1_all.deb) ...
    Setting up warsow-data (0.31-1) ...
    Setting up warsow (0.31.dfsg-6) ...
    The key here is that you DON'T point it towards a certain file, but just tell it to do a general one.

    Thanks for your tip though seems useful!

  3. #33
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    I believe you are right! I just tried the following test:

    graphviz depends on libgraphviz3.
    So libgraphviz3 has to be installed first, but graphviz comes first alphabetically (unlike warsow and warsow-data, where I'm a bit unsure about the order in which "*.deb" is expanded).
    Code:
    sudo apt-get --download-only install graphviz libgraphviz3
    This downloads graphviz_2.12-4ubuntu3_i386.deb and
    libgraphviz3_2.12-4ubuntu3_i386.deb into /var/cache/apt/archives without installing them.

    I then copied the debs into a test directory:
    Code:
    cp /var/cache/apt/archives/libgraphviz3_2.12-4ubuntu3_i386.deb /var/cache/apt/archives/graphviz_2.12-4ubuntu3_i386.deb .
    
    sudo dpkg -i *.deb
    
    Selecting previously deselected package graphviz.
    (Reading database ... 170366 files and directories currently installed.)
    Unpacking graphviz (from graphviz_2.12-4ubuntu3_i386.deb) ...
    Selecting previously deselected package libgraphviz3.
    Unpacking libgraphviz3 (from libgraphviz3_2.12-4ubuntu3_i386.deb) ...
    Setting up libgraphviz3 (2.12-4ubuntu3) ...
    
    Setting up graphviz (2.12-4ubuntu3) ...
    
    Processing triggers for libc6 ...
    ldconfig deferred processing now taking place
    dpkg does seem to be able to sort out the dependency problem as long as all the required deb packages are listed at once (in the same command)!

    Thanks for helping me learn this, abhiroopb.

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

    Re: HOWTO: Backup all installed programs/packages

    No problem. So it seems that all it takes is putting ALL debs in one directory and running dpkg -i *.deb. But you have to make sure that all dependencies are in the directory.

  5. #35
    Join Date
    Aug 2008
    Beans
    9

    Re: HOWTO: Backup all installed programs/packages

    ok, thats good but how can i repackage a single program with it's dependences ? it's really urgent for me as i sometime want to transfere a program form my labtop to my friend labtop and i have no way ? could any one tell me ?

  6. #36
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Backup all installed programs/packages

    On the friend's computer run
    Code:
    sudo apt-get install --simulate LIST-OF-PACKAGES
    You don't have to have an internet connection to run this.

    Here is an example of the output using the package 'kate':
    Code:
    % sudo apt-get install --simulate kate
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      kdelibs-data kdelibs4c2a libarts1c2a libavahi-qt3-1 liblua50 liblualib50
    Suggested packages:
      kate-plugins khelpcenter konsole fam
    Recommended packages:
      kregexpeditor perl-suid libarts1-akode
    The following NEW packages will be installed:
      kate kdelibs-data kdelibs4c2a libarts1c2a libavahi-qt3-1 liblua50
      liblualib50
    0 upgraded, 7 newly installed, 0 to remove and 87 not upgraded.
    Note this line:
    Code:
    The following NEW packages will be installed:
      kate kdelibs-data kdelibs4c2a libarts1c2a libavahi-qt3-1 liblua50
      liblualib50
    This shows all the packages your friend would need to install kate.

    Now go to your machine and type abhiroopb's commands (slightly modified):
    Code:
    sudo apt-get install dpkg-repack fakeroot
    mkdir ~/dpkg-repack; cd ~/dpkg-repack
    fakeroot -u dpkg-repack kate kdelibs-data kdelibs4c2a libarts1c2a libavahi-qt3-1 liblua50 liblualib50       # Just list all the packages you need

  7. #37
    Join Date
    Aug 2008
    Beans
    64

    Re: HOWTO: Backup all installed programs/packages

    is this just for .debs or is it for other installed things too?
    does it also include things like drivers i installed like flash or restricted old drivers, etc? if not, is there a method to encompass both?

    is there a way to make a list of the programs i installed? i dont know exactly where to look if i want a list of stuff like

    envy
    mysql
    php
    shorewall
    wordpress
    etc...

    just want the programs i installed. a list of everything i added.
    Code:
    ubuntu karmic
    

  8. #38
    Join Date
    Sep 2008
    Location
    Florida
    Beans
    64
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HOWTO: Backup all installed programs/packages

    I've used this tool several times in the past and has always worked flawlessly until Jaunty came along.

    Anyone know why this may be?

    Here is what the terminal spat back at me:

    Code:
    fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut
    > -f1`
    cut: you must specify a list of bytes, characters, or fields
    Try `cut --help' for more information.
    bash: -f1: command not found
    Usage: dpkg-repack [options] packagename [packagename ..]
    	--root=dir	Take package from filesystem rooted on <dir>.
    	--arch=arch	Force the parch to be built for architecture <arch>.
    	--generate	Generate build directory but do not build deb.
    	packagename	The name of the package to attempt to repack.
    renken@renken-desktop:~/dpkg-repack$ fakeroot -u dpkg-repack `dpkg --get-selections | grep install
    >
    I hope someone else has been brave enough to try Jaunty and came up with the same issue.

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

    Re: HOWTO: Backup all installed programs/packages

    are you putting cut -f1 on the same line?

    it should be:

    Code:
    fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`
    from what you posted it seems to be doing:
    Code:
    fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut
    > -f1`

  10. #40
    Join Date
    Jan 2008
    Beans
    2

    Re: HOWTO: Backup all installed programs/packages

    Can you add remarks to this file such as date and information on how back and/or restore?

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