LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-15-2015, 10:40 AM   #1
Deewanagan
Member
 
Registered: Sep 2008
Posts: 57

Rep: Reputation: 15
Unhappy Backing up data for reinstallation


Hey,

I have installed debian on my laptop, and am pretty happy with how it works! But there is no happy ever after I guess. I have run out of space on my / partition. I had installed debian(minimal) on my laptop, with two partitions: one for /home, and one for / . Since my laptop has SSD(128 GB+ windows 8 installed by default), there wasn't much space for allocation. So I allocated 10 GB for /. Now I have run out of space, and can't do anything(even dropbox won't start). Since I started with a minimal debian installation, I did lots of customization (window manager, conky, ...). Now a reinstallation seems inevitable. That brings to my question(s).

1. Is there a way to preserve all the settings while extending the size for root partition? Meaning, I would re-install minimal system to extend partition size, and then some how restore all data for / and /home partitions?

2. If not, is there a way to backup & restore safely home directory data?(I guess i can do this via tar, but just to be sure)

3. Is there a way to keep track of all the softwares installed in the system, so that once I reinstall the system, I would simply need to restore the list and system would install them?(I installed so many softwares, and it took me a while to do that, and I don't want to repeat it again. I also have tried backing up up the list of dpkg previously, but it didn't work).

thanks,
 
Old 04-15-2015, 12:02 PM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
1. Is there a way to preserve all the settings while extending the size for root partition? Meaning, I would re-install minimal system to extend partition size, and then some how restore all data for / and /home partitions?

2. If not, is there a way to backup & restore safely home directory data?(I guess i can do this via tar, but just to be sure)
There are many ways to back-up and restore all settings. I see here the real problem is the space available. Simple suggestion is to get an additional hard drive connected through USB port and place everything you need to restore later. I have done my automated configuration (settings) back up through a script triggered by "cron" weekly, using "rsync" and if something goes wrong restoring was a simple extraction or copying command from the storage in the separate partition (not a usb connected disk in my case); the script is simple to write and you can obtain these from internet freely (tell me if you want a sample I'll post a short one here).

Another way (which is fitting to your case for it appears the back up is mainly temporary one) is to use "dd" command. For example your new usb connected hard drive is ready, you can copy a complete image of your existing and running debian into that drive; after space adjustment you can restore the same through the terminal by simple "dd" command. But since this command is quite dangerous to newbies I'd suggest you first read the manual on dd
Code:
man dd
and return here if you have further question before you employ it. You can even use your existing SDD partition if you have enough space therein to house the debian partition image INSIDE A FOLDER you made (just be careful not to mistake), I think dd can handle FAT32 or ntfs file systems --I have employed dd regularly but only within linux file systems.


Quote:
3. Is there a way to keep track of all the softwares installed in the system, so that once I reinstall the system,
Tracking installed software is transparent in every Gnu/Linux system. Records are normally kept inside /var directory, just examine yours. I am not familiar with debian, but mine here is located at /var/log/packages in Slackware.

Quote:
I would simply need to restore the list and system would install them?
I don't know if there is an application in debian to that method. Just examine debian backup software packages if there is. Under Slackware I think we don't have the means to reinstall completely ALL by simply using the LIST. However, practical way is to gather all the *.deb packages into a directory and there reinstall all by a single terminal command. I have done this manner in Slackware using a wildcard
Code:
installpkg ./*
and installation of over twenty packages just went through in series while I was drinking a cup of coffee when all was done I merely went down to init 1 then back to init 4, login and run without need of rebooting.

This is only a sharing of my experience in Gnu/Linux and the methods I would have employed if facing your current problem. Normally you have to consult the manual pages first before using above solutions.

Good luck and enjoy.

m.m.
 
1 members found this post helpful.
Old 04-15-2015, 12:31 PM   #3
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
What is your partitions layout? You could try to resize your root partition *if* you can *first* resize/move your home partition, in order to get some unallocated space.
 
Old 04-15-2015, 03:51 PM   #4
Deewanagan
Member
 
Registered: Sep 2008
Posts: 57

Original Poster
Rep: Reputation: 15
Thank you very much for detailed reply. I have a question regarding dd, would it matter if changed the partitions? If I take images of / and /home on a USB hard disk, and changed the original partition sizes, will the images still be usable?

Quote:
Originally Posted by malekmustaq View Post
There are many ways to back-up and restore all settings. I see here the real problem is the space available. Simple suggestion is to get an additional hard drive connected through USB port and place everything you need to restore later. I have done my automated configuration (settings) back up through a script triggered by "cron" weekly, using "rsync" and if something goes wrong restoring was a simple extraction or copying command from the storage in the separate partition (not a usb connected disk in my case); the script is simple to write and you can obtain these from internet freely (tell me if you want a sample I'll post a short one here).

Another way (which is fitting to your case for it appears the back up is mainly temporary one) is to use "dd" command. For example your new usb connected hard drive is ready, you can copy a complete image of your existing and running debian into that drive; after space adjustment you can restore the same through the terminal by simple "dd" command. But since this command is quite dangerous to newbies I'd suggest you first read the manual on dd
Code:
man dd
and return here if you have further question before you employ it. You can even use your existing SDD partition if you have enough space therein to house the debian partition image INSIDE A FOLDER you made (just be careful not to mistake), I think dd can handle FAT32 or ntfs file systems --I have employed dd regularly but only within linux file systems.




Tracking installed software is transparent in every Gnu/Linux system. Records are normally kept inside /var directory, just examine yours. I am not familiar with debian, but mine here is located at /var/log/packages in Slackware.



I don't know if there is an application in debian to that method. Just examine debian backup software packages if there is. Under Slackware I think we don't have the means to reinstall completely ALL by simply using the LIST. However, practical way is to gather all the *.deb packages into a directory and there reinstall all by a single terminal command. I have done this manner in Slackware using a wildcard
Code:
installpkg ./*
and installation of over twenty packages just went through in series while I was drinking a cup of coffee when all was done I merely went down to init 1 then back to init 4, login and run without need of rebooting.

This is only a sharing of my experience in Gnu/Linux and the methods I would have employed if facing your current problem. Normally you have to consult the manual pages first before using above solutions.

Good luck and enjoy.

m.m.
 
Old 04-15-2015, 04:44 PM   #5
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
In debian, you can use dpkg to list installed packages:
Code:
dpkg --get-selections > package_list
 
Old 04-15-2015, 06:29 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Why is there a need to reinstall if you've simply run out of space ?.
Use gparted to resize whatever can give up the space - maybe Win8, maybe /home. On small systems I see no reason to complicate things with multiple partitions - I leave everything under /, and fix what gets too big. Let's see (maybe as root/sudo)
Code:
parted /dev/sda "print free"
df -hT
 
1 members found this post helpful.
Old 04-15-2015, 11:43 PM   #7
Deewanagan
Member
 
Registered: Sep 2008
Posts: 57

Original Poster
Rep: Reputation: 15
I feel stupid of not thinking about re-sizing partitions! I resized my partitions and everything is fine!
 
Old 04-16-2015, 12:22 AM   #8
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
Quote:
Originally Posted by Deewanagan View Post
I feel stupid of not thinking about re-sizing partitions!
You probably mean 'not reading all answers'.

Last edited by manu-tm; 04-16-2015 at 01:00 AM.
 
  


Reply

Tags
backup, debian, install, partition



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing up data over LAN srunni Linux - Software 4 06-24-2008 05:20 PM
Backing up ~75GB of data on Redhat rel 4 srvr using backup exec shows ~1.3TB of data? unicorntoo Linux - Software 1 05-01-2008 08:32 AM
backing up Evolulion Data impeteperry Ubuntu 2 06-20-2006 07:24 PM
backing up data to a CD-RW joshknape Linux - Software 2 01-08-2006 01:35 AM
Backing Up Data? carlosinfl Linux - Networking 4 12-31-2005 12:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration