Page 1 of 2

Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 4:13 pm
by beer-in-box
Hi,

I have been having problems with my PC on both Windows and Linux. And Windows crashed and Linux isn't stable. I am going to wipe all the disk and reinstall both Linux and Windows.

The thing is that, I have a slow internet connection which I share with my friends. So, it would take years to download what I have downloaded so far. Then I figured I could backup my downloaded applications with MintBackup.
But when I try this, I realized that it only backs up the names of the packages. This is no use for me as what I need is to install the packages after reinstalling Linux.

So, what should I do to backup and restore the applications I have downloaded properly? Is mintbackup the tool for this or should I use another? And how? :)
Thanks in advance.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 4:36 pm
by beer-in-box
Well, while waiting for an answer, I found out that APTonCD seems like it can do what I want.
So, does this app save the application datas too? I don't want it to save the user datas, only the applications.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 4:37 pm
by xenopeek
Have a look in /var/cache/apt/archives. Usually a lot of .deb files remain here from packages that you downloaded and installed, you can manually reinstall from these files (if you copy them :wink:) on a new system with the same Linux Mint version (right-click them and lauch with GDebi).

From the Live CD you could make a small, temporary partition, to put these files on while you reinstall Windows and Linux Mint to the other partitions. (If you don't have a backup medium like DVD, USB stick or external HDD).

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 4:53 pm
by beer-in-box
Thank you Vincent. Came to help as always :)

I think I could backup my installed applications as an ISO. I saw that it backed up Mint updates too. Does that have a potential to cause problems?

And, assume that it only backed up my installed apps and left the Mint updates, would these applications be installed to any other Linux distribution which uses APT?

EDIT: Well, I just tried how it would do it. It just copies the deb files. Is there a way to automate the installation progress? It seems I have about 500 applications to double click or type in shell.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 5:18 pm
by Elisa
Hello,

it's possible, of course, e.g. this way ;)

Open terminal
Place all your .deb files which you wanna install to one place (it's easier for you to sign them by mouse and drag & drop them then)

Drag & drop them to the terminal window

Then, press Home button on keyboard to be in the beginning of the line and type:

sudo dpkg -i
[there is a space between dpkg and -i and one space after -i]

Just slap Enter and voila :D

My example:

my_account@my_domain:~$ sudo dpkg -i /home/my_account/downloaded/bin_stuff/deb_sources/debian-multimedia-keyring_2010.12.26_all.deb /home/my_account/downloaded/bin_stuff/google-chrome-stable_current_i386.deb
etc., how many deb files you have, so many place them to terminal ;)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Wed Sep 28, 2011 5:49 pm
by beer-in-box
Thank you. That was just in time! My harddisk gave the error that I expected for a while :) Now I am at Live CD and gonna restore Windows by using Acronis and install Linux later.
Thank you both for sharing the knowledge and tips :)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Thu Sep 29, 2011 5:00 pm
by beer-in-box
I wanted to thank you guys once again.

My problem was a hard disk and mainboard related problem. It died yesterday, just after I asked you that question lol.
I disassembled the whole PC. Disassembled the PSU too and cleaned and checked the connections and rebuilt it. Now, it works flawlessly :)

And Elisa, your method didn't work :) Mint put a (') symbol to beginning and the end of every path, so it didn't recognize the paths. I think I will have to download them all once again :(

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Thu Sep 29, 2011 5:12 pm
by xenopeek
beer-in-box wrote:I disassembled the whole PC. Disassembled the PSU too and cleaned and checked the connections and rebuilt it. Now, it works flawlessly :)
:mrgreen: Good work!

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Thu Sep 29, 2011 5:21 pm
by beer-in-box
xenopeek wrote: :mrgreen: Good work!
Man, I was about to cry. Out of sudden, it stopped working. It was like it is saying "I have too many problems, I am committing a suicide". I begged, but no, died.
Then I tried to reanimate it. In medicine, there is a rule; Try to save a man's life as long as your breath, your muscles and your brain lets you. So I didn't give up when I though it is long gone. I had a long surgery but I managed to make it live and shine again :)
I bought some parts of it recently, and I paid much for it :D And I am still paying lol.

Anyway, any way to make installing 550 packages process easier and shorter? :)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Thu Sep 29, 2011 6:55 pm
by xenopeek
beer-in-box wrote:Anyway, any way to make installing 550 packages process easier and shorter? :)
Sorry, can't help there :(

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Fri Sep 30, 2011 5:28 am
by Elisa
Hey,
and if you would erasure those '', it'll run ?
If so, make a trick :D

The copied list of all packages (drag&dropped to terminal) copy again but paste to a text editor where you will use auto-replace function in the text editor and your imagination, of course.
Then, list without unneeded characters, again copy and paste to terminal and continue on my former advice...
If your not sure, just ask for additional tips :)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Fri Sep 30, 2011 5:46 am
by beer-in-box
Thank you Elisa, I should have thought this kind of trick to enable myself to install them :)
Unfortunately, I have downloaded them all from the Internet again, kept PC running at night and installed all the packages I need.

But, I am keeping my right to ask you further questions about this method in the next time I encounter something like that. A useful, very useful tip indeed.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Fri Sep 30, 2011 6:14 am
by Elisa
As I mentioned a long time ago, Linux is and will be always a Magic Land (Like Alice in the Wonderland) :D
Just losers smiled due on their stupid opinion, it's a silly idea.
Yep, leave such losers but it's true ;)

Well, don't forget to backup (copy to another place) your recently downloaded .deb packages! ;)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sat Oct 01, 2011 8:11 pm
by beer-in-box
Hey, I am not sure where they are downloaded. So, I can't backup them now :)
And, I think they don't include dependencies in the package. This looks like a potential problem in the future when I try to install using my backups which I did manually. Do the package managers download and install dependencies if they don't exist?

One thing about backing up, is there a software to take an image of my system? And if there is, how does it do that? Now I have 2 partitions; one for / and one for /home (BTW, I hoped that my new /home partition would help me keeping my applications but no, it didn't help - So, why do we put it into another partition again? :) ). What would it do if I decide to go with 1 partition which includes them all?

I have many questions, because I am sick of downloading stuff over and over again :) I am trying to learn, and while trying to learn, I mess everything up so bad that it is easier to reinstall instead of 'trying' to fix it :)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sat Oct 01, 2011 8:25 pm
by wayne128
beer-in-box wrote:Hey, I am not sure where they are downloaded. So, I can't backup them now :)
And, I think they don't include dependencies in the package. This looks like a potential problem in the future when I try to install using my backups which I did manually. Do the package managers download and install dependencies if they don't exist?

One thing about backing up, is there a software to take an image of my system? And if there is, how does it do that? Now I have 2 partitions; one for / and one for /home (BTW, I hoped that my new /home partition would help me keeping my applications but no, it didn't help - So, why do we put it into another partition again? :) ). What would it do if I decide to go with 1 partition which includes them all?

I have many questions, because I am sick of downloading stuff over and over again :) I am trying to learn, and while trying to learn, I mess everything up so bad that it is easier to reinstall instead of 'trying' to fix it :)
It is easy to Clone your installation and keep it at outside the computer such as a usb stick or usb drive's partitions.
The common ones use for cloning are
clonezilla
fsarchiver
remastersys ( i think this one has 4G limit)
gparted

for me I use lazy method, just use gparted to copy and paste partition.
when I need to re-install clone, use gparted to copy and paste partitions to the hard disk, then install grub.
also , as I multiboot a lots, I put one OS on one partition, so that it is easier for me to clone just one partition for that OS. I try to be as simple as possible so that I have easier life.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sat Oct 01, 2011 8:47 pm
by beer-in-box
Hi wayne128, thank you for your answer!

Now I have some more questions :) How do you restore the partition you cloned? And how the process goes? I mean, if I just copied the partition, it wouldn't boot I guess. There should be some more extra steps, considering that I use windows too.

At the moment, I have a clean, updated and prepared instalation and I want to get an image of it before messing it up :)

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sat Oct 01, 2011 8:51 pm
by wayne128
beer-in-box wrote:Hi wayne128, thank you for your answer!

Now I have some more questions :) How do you restore the partition you cloned? And how the process goes? I mean, if I just copied the partition, it wouldn't boot I guess. There should be some more extra steps, considering that I use windows too.

At the moment, I have a clean, updated and prepared instalation and I want to get an image of it before messing it up :)

May be you can read this thread for a bit more details:
http://forums.linuxmint.com/viewtopic.php?f=90&t=80360

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sun Oct 02, 2011 1:41 am
by Elisa
As for your installed apps, their (downloaded) .debs should appear here:

/var/cache/apt/archives/

Just check it out before backuping. Then you can run just 1 line to backup them (of course in terminal aka CLI), e.g.:

sudo cp -r /var/cache/apt/archives ~/backup/debs

In this case, I have in my /home/my_account (which represent ~/ in the note above) a folder backup.
If you even wouldn't have backup or debs folder they will be created and all stuff from archives folder will be copied to the destination.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sun Oct 02, 2011 5:43 am
by beer-in-box
Thank you gentlemen. You help is much appreciated.
wayne128 wrote: May be you can read this thread for a bit more details:
http://forums.linuxmint.com/viewtopic.php?f=90&t=80360
Well wayne, I saw that you have put in this thread more than what I would need :) All of the questions that I could ask seem like they are already answered! This is good for all of newbies around who mess with their computers and have to reinstall the OS time to time :) I will definitely backup my stuff using your lazy method and maybe with Clonezilla, if I can. This way, I can learn which one I can do faster, better and knowing what I am doing. Then I could stick to your lazy method or my new lazy Clonezilla or Gparted method.

You posted a detailed tutorial there, which should be a sticky in my opinion. Thank you again.

Elisa wrote:As for your installed apps, their (downloaded) .debs should appear here:

/var/cache/apt/archives/

Just check it out before backuping. Then you can run just 1 line to backup them (of course in terminal aka CLI), e.g.:

sudo cp -r /var/cache/apt/archives ~/backup/debs

In this case, I have in my /home/my_account (which represent ~/ in the note above) a folder backup.
If you even wouldn't have backup or debs folder they will be created and all stuff from archives folder will be copied to the destination.
I knew they were stored in a "cache" folder, I just couldn't find the cache folder :) Something I won't forget now.

If I can do, I am going to clone my disks with wayne128's method, then backup deb packages like you said. I want to feel as secure as one can feel.

So, when people say "Using shell is easier than using GUI", they mean that! Instead of creating a folder to somewhere and going to cache folder and copying everything then pasting them into new folder, I can do that by typing 1 line of characters :D
This is what I looked for in my previous Linux attempts. I wanted to meet some guys who stop saying "Use the Sheeeeeeellllll" and show me why it is easier and why I should get used to it :)

I have a question about the line I should write. You typed "cp -r", I know this means "copy the folder" and "-r" means recursive. But what would happen if I didn't type "-r"? And, what other useful arguments do I have to use with cp?

Again, thank you for your help. It is not easy to read&answer the same questions over and over again.

Re: Mint Backup Questions - To Avoid Downloading Again

Posted: Sun Oct 02, 2011 6:21 am
by xenopeek
beer-in-box wrote:I have a question about the line I should write. You typed "cp -r", I know this means "copy the folder" and "-r" means recursive. But what would happen if I didn't type "-r"? And, what other useful arguments do I have to use with cp?
-r means recursive, which means copy any files in that folder, and also any files in its subfolders. Without the -r, it would copy only the files in the first folder without also doing the subfolders.

Type:

Code: Select all

man cp
To find out about other options. Getting into the shell, it is good to learn to use the man command. Can be bit terse in explanation, but with some tips from the forums the man pages really contain a lot of information.