What to delete before taking a system snapshot

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
iain_j
Level 2
Level 2
Posts: 78
Joined: Wed Jul 04, 2012 9:22 am

What to delete before taking a system snapshot

Postby iain_j » Thu May 02, 2013 4:54 pm

After getting my system up and running again I decided to make an image of my root partition with fsarchiver, to save myself a lot of time and effort when I next bork the system (I can't help but tinker :D ). I booted from the GParted live CD, mounted the root, and ran fsarchiver in verbose mode. Straight away I saw a lot of files flying by that really needn't be included and were otherwise wasting space in the archive and wasting time - KDE caches, apt-get downloads, font caches, thumbnail caches, etc.

So I restarted the system and set about clearing out the junk:

  • ran sudo apt-get clean
  • emptied the firefox cache
  • deleted banshee's database (easy enough to restore again)
  • emptied the wastebin

...and ran fsarchiver again. Just clearing those out shaved a couple of gigabytes from the archive; now it's small enough to fit on a DVD. Are there any other places I could clear files out from? I'm looking to be able to restore the system with the applications and configuration I have now, but basically empty of data. Ideally I should have done this after installing everything I wanted, but before starting to *use* the computer.

As I said there were a lot of cached thumbnails and fonts flying through the list in fsarchiver, but I don't know enough about where these are stored to go deleting things.
Linux Mint 14 KDE (32 bit) -- HP G70 Laptop
Intel Pentium Dual Core T3400 @ 2.16GHz -- 3Gb DDR2 RAM -- 250Gb HDD
Intel Mobile 4 Series graphics -- Intel 82801I audio
Atheros AR242x/AR542x wireless network adapter

User avatar
catweazel
Level 7
Level 7
Posts: 1656
Joined: Fri Oct 12, 2012 9:44 pm

Re: What to delete before taking a system snapshot

Postby catweazel » Thu May 02, 2013 5:21 pm

Install and run bleachbit.

Run the standard user bleachbit and the root mode bleachbit.
Mint Testing Team & Mint Donor #3606
Intel i7 4820K @ 4.7GHz, 32GB Corsair Vengeance Pro
2133MHz XMP, 4 Samsung 850 PRO 512GB SSDs in
RAID0, 12TB HW RAID10, 3 x 24" Samsung UlHD,
Dual R290X

User avatar
DataMan
Level 6
Level 6
Posts: 1234
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Midwest USA at /var/www
Contact:

Re: What to delete before taking a system snapshot

Postby DataMan » Fri May 03, 2013 5:23 am

I agree.

This is exacly what I do on a weekly basis (2x - once before updates and once after)

1. Clean out e-mail etc.
2. Run Bleachbit 2x (root and normal) as they have some different cleanup points.
3. Archive #1 via fsarchiver
4. Re-boot (I run fsarchiver native boot) and upgrade.
5. Repeat the Bleachbit routine outlined above.
6. Archive #2 via fsarchiver,

This gives me clean recovery point if the upgrade proves to be "challenge".

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015

iain_j
Level 2
Level 2
Posts: 78
Joined: Wed Jul 04, 2012 9:22 am

Re: What to delete before taking a system snapshot

Postby iain_j » Fri May 03, 2013 4:01 pm

Thanks for the advice guys.

Installed bleachbit tonight, ran it in "normal" mode, selected everything, and freed up over 1GB of disk space.

Then I chose "Bleachbit (as root)" from the menu, entered the password... and nothing happened. Tried again, still nothing. Tried from the terminal and got this error:

Code: Select all

iain@iain-G70 ~ $ sudo bleachbit
[sudo] password for iain:
No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Could not open X display


Any suggestions? Tried it through su as well as sudo, same result. Can't find anything helpful on google :?
Linux Mint 14 KDE (32 bit) -- HP G70 Laptop
Intel Pentium Dual Core T3400 @ 2.16GHz -- 3Gb DDR2 RAM -- 250Gb HDD
Intel Mobile 4 Series graphics -- Intel 82801I audio
Atheros AR242x/AR542x wireless network adapter

User avatar
catweazel
Level 7
Level 7
Posts: 1656
Joined: Fri Oct 12, 2012 9:44 pm

Re: What to delete before taking a system snapshot

Postby catweazel » Fri May 03, 2013 9:52 pm

Code: Select all

gksu bleachbit

^^^^For MATE & Cinnamon.

Code: Select all

kdesudo bleachbit

^^^^For KDE.

Also, bleachbit as root will be in your menu system somewhere.
Mint Testing Team & Mint Donor #3606
Intel i7 4820K @ 4.7GHz, 32GB Corsair Vengeance Pro
2133MHz XMP, 4 Samsung 850 PRO 512GB SSDs in
RAID0, 12TB HW RAID10, 3 x 24" Samsung UlHD,
Dual R290X

User avatar
DataMan
Level 6
Level 6
Posts: 1234
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Midwest USA at /var/www
Contact:

Re: What to delete before taking a system snapshot

Postby DataMan » Sat May 04, 2013 5:11 am

Look in your menu for Bleachbit. When it was installed from synaptic it should have created 2 instances in the menu, 1 root and one juts named Bleachbit.

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015

iain_j
Level 2
Level 2
Posts: 78
Joined: Wed Jul 04, 2012 9:22 am

Re: What to delete before taking a system snapshot

Postby iain_j » Sat May 04, 2013 8:33 am

iain_j wrote:Then I chose "Bleachbit (as root)" from the menu, entered the password... and nothing happened


Bleachbit as root wouldn't work from the menu, or from any variation of sudo / kdesudo / su.

However this morning I've discovered it will work, from the menu, after a fresh boot, but not straight after running bleachbit in normal mode. If I run it in normal mode, reboot, then run it as root, it works fine. Maybe in normal mode it deletes something which temporarily breaks the system, but is then restored during bootup.

Anyway, I did all this, booted from the GParted DVD, ran fsarchiver again and now have a 1.8gig archive of my operating system - it was about 5 gig first time round. Happy with that 8)
Linux Mint 14 KDE (32 bit) -- HP G70 Laptop
Intel Pentium Dual Core T3400 @ 2.16GHz -- 3Gb DDR2 RAM -- 250Gb HDD
Intel Mobile 4 Series graphics -- Intel 82801I audio
Atheros AR242x/AR542x wireless network adapter

User avatar
catweazel
Level 7
Level 7
Posts: 1656
Joined: Fri Oct 12, 2012 9:44 pm

Re: What to delete before taking a system snapshot

Postby catweazel » Sat May 04, 2013 8:36 am

iain_j wrote:Happy with that 8)

Glad you got it sorted. Cheers.
Mint Testing Team & Mint Donor #3606
Intel i7 4820K @ 4.7GHz, 32GB Corsair Vengeance Pro
2133MHz XMP, 4 Samsung 850 PRO 512GB SSDs in
RAID0, 12TB HW RAID10, 3 x 24" Samsung UlHD,
Dual R290X


Return to “Other topics”

Who is online

Users browsing this forum: No registered users and 1 guest