Re: btrfs restores busted saucy desktops
Here is the link where I begin to do the rollback from Quantal to Precise .. and yes .. it only worked if I had an ext4 partition installed 'alongside'.
http://ubuntuforums.org/showthread.p...4#post12507474
Unfortunately that hdd, an 80GBWD, was a refurbish and is now not functioning properly so I'll have to try this on another hdd. ok ... found another 40GB WD jewel to give up to the cause.
So I'll start with a Saucy install rather than a Raring or .. wait a sec ... hmmmm .. I'll use the current raring btrfs, upgrade to Saucy (but also creating a snapshot first). Then , roll back , and after doing my proccedure of removing and reinstalling apt-btrfs-snapshot, take a snapshot of the Saucy install.. then attempt to rollback to the raring install and then , from there , attempt to rollup back to saucy !
Re: btrfs restores busted saucy desktops
Re: btrfs restores busted saucy desktops
I am starting the new experiment here with fresh install of raring. No updates except apt-btrfs-snapshot and
sudo apt-get install synaptic
Code:
ventrical@ventrical-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
ventrical@ventrical-desktop:~$ sudo apt-get install apt-btrfs-snapshot
[sudo] password for ventrical:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
apt-btrfs-snapshot
0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
Need to get 7,852 B of archives.
After this operation, 97.3 kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu/ raring/universe apt-btrfs-snapshot all 0.3.4.1 [7,852 B]
Fetched 7,852 B in 0s (31.6 kB/s)
Selecting previously unselected package apt-btrfs-snapshot.
(Reading database ... 155921 files and directories currently installed.)
Unpacking apt-btrfs-snapshot (from .../apt-btrfs-snapshot_0.3.4.1_all.deb) ...
Setting up apt-btrfs-snapshot (0.3.4.1) ...
ventrical@ventrical-desktop:~$ apt-btrfs-snapshot supported
Sorry, you need to be root to run this program
ventrical@ventrical-desktop:~$ su
Password:
su: Authentication failure
ventrical@ventrical-desktop:~$ sudo -i
[sudo] password for ventrical:
root@ventrical-desktop:~# apt-btrfs-snapshot supported
Supported
root@ventrical-desktop:~# sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
docbook-xml libept1.4.12 librarian0 rarian-compat sgml-data
Suggested packages:
docbook docbook-dsssl docbook-xsl docbook-defguide perlsgml w3-recs opensp
libxml2-utils dwww menu deborphan tasksel
The following NEW packages will be installed:
docbook-xml libept1.4.12 librarian0 rarian-compat sgml-data synaptic
0 upgraded, 6 newly installed, 0 to remove and 23 not upgraded.
Need to get 3,338 kB of archives.
After this operation, 12.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ca.archive.ubuntu.com/ubuntu/ raring/main sgml-data all 2.0.8 [276 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu/ raring/main docbook-xml all 4.5-7.1 [336 kB]
Get:3 http://ca.archive.ubuntu.com/ubuntu/ raring/main libept1.4.12 i386 1.0.9 [136 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu/ raring/main librarian0 i386 0.8.1-5build1 [58.4 kB]
Get:5 http://ca.archive.ubuntu.com/ubuntu/ raring/main rarian-compat i386 0.8.1-5build1 [100 kB]
Get:6 http://ca.archive.ubuntu.com/ubuntu/ raring/universe synaptic i386 0.80~exp2 [2,431 kB]
Fetched 3,338 kB in 26s (127 kB/s)
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-o3tppa/@' in '/tmp/apt-btrfs-snapshot-mp-o3tppa/@apt-snapshot-2013-05-20_19:37:45'
Selecting previously unselected package sgml-data.
(Reading database ... 155933 files and directories currently installed.)
Unpacking sgml-data (from .../sgml-data_2.0.8_all.deb) ...
Selecting previously unselected package docbook-xml.
Unpacking docbook-xml (from .../docbook-xml_4.5-7.1_all.deb) ...
Selecting previously unselected package libept1.4.12.
Unpacking libept1.4.12 (from .../libept1.4.12_1.0.9_i386.deb) ...
Selecting previously unselected package librarian0.
Unpacking librarian0 (from .../librarian0_0.8.1-5build1_i386.deb) ...
Selecting previously unselected package rarian-compat.
Unpacking rarian-compat (from .../rarian-compat_0.8.1-5build1_i386.deb) ...
Selecting previously unselected package synaptic.
Unpacking synaptic (from .../synaptic_0.80~exp2_i386.deb) ...
Processing triggers for sgml-base ...
Processing triggers for doc-base ...
Scrollkeeper was installed, forcing re-registration of all documents.
Unregistering 32 doc-base files, re-registering 32 doc-base files...
Registering documents with scrollkeeper...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Setting up sgml-data (2.0.8) ...
Setting up libept1.4.12 (1.0.9) ...
Setting up librarian0 (0.8.1-5build1) ...
Setting up synaptic (0.80~exp2) ...
Processing triggers for sgml-base ...
Setting up docbook-xml (4.5-7.1) ...
Processing triggers for sgml-base ...
Setting up rarian-compat (0.8.1-5build1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@ventrical-desktop:~#
Please note the created snapshot
Edit:
'snapshots'
@apt-snapshot-2013-05-20_19:37:45
@apt-snapshot-2013-05-20_19:55:47
@apt-snapshot-2013-05-20_19:55:48
@apt-snapshot-2013-05-20_19:55:49
root@ventrical-desktop:~#
Ok... big boo boo here. My bad. I forgot to disable apt-btrfs-snapshot before I updated to the proprietary Nvidia driver , which , of course, called apt and hence engaged apt-btrfs-snapshot in the background. Hmm interesting ... but why three extra snapshots ??
ok.. time to upgrade to Saucy - disable apt-btrfs-snapshot
Edit note:
and this will in turn create yet another snapshot.
Code:
root@ventrical-desktop:~# sudo apt-get remove apt-btrfs-snapshot
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-generic linux-image-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
apt-btrfs-snapshot
0 upgraded, 0 newly installed, 1 to remove and 22 not upgraded.
After this operation, 97.3 kB disk space will be freed.
Do you want to continue [Y/n]? y
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-p2wt3i/@' in '/tmp/apt-btrfs-snapshot-mp-p2wt3i/@apt-snapshot-2013-05-20_20:13:56'
(Reading database ... 156954 files and directories currently installed.)
Removing apt-btrfs-snapshot ...
root@ventrical-desktop:~#
Re: btrfs restores busted saucy desktops
Onward to saucy...
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-p2wt3i/@' in '/tmp/apt-btrfs-snapshot-mp-p2wt3i/@apt-snapshot-2013-05-20_20:13:56'
(Reading database ... 156954 files and directories currently installed.)
Removing apt-btrfs-snapshot ...
root@ventrical-desktop:~# sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list
root@ventrical-desktop:~# sudo apt-get update && sudo apt-get dist-upgrade
Get:1 http://security.ubuntu.com saucy-security Release.gpg [933 B]
Re: btrfs restores busted saucy desktops
While the upgrade is going on I just wanted to jot down some notes here .. the idea being that theoretically a btrfs snapshot can be downloaded and 'rolled-up' on the an earlier development cycle almost like a daily .iso file. It would only be exclusive to btrfs but would be a true model of a 'rolling release'.
Re: btrfs restores busted saucy desktops
Successfully upgraded to Saucy and made a snapshot by
sudo apt-get install htop
Code:
root@ventrical-desktop:~# sudo apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-generic linux-image-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
htop
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.7 kB of archives.
After this operation, 189 kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu/ saucy/universe htop i386 1.0.2-1 [67.7 kB]
Fetched 67.7 kB in 0s (102 kB/s)
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-xubuaj/@' in '/tmp/apt-btrfs-snapshot-mp-xubuaj/@apt-snapshot-2013-05-20_21:23:30'
Selecting previously unselected package htop.
(Reading database ... 186412 files and directories currently installed.)
Unpacking htop (from .../archives/htop_1.0.2-1_i386.deb) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Setting up htop (1.0.2-1) ...
root@ventrical-desktop:~#
time to roll back to raring snapshot - and then rollup back to saucy.
Re: btrfs restores busted saucy desktops
I am totally stunned! I seamlessly rolled back to fresh install of raring.
Ok.. now to 'rollup" back to saucy. First I have to reinstall apt-btrfs-snapshot in the raring install.??? Hmmm apt-btrfs-snapshot is already installed. I'm amazed still again.
Code:
root@ventrical-desktop:~# apt-btrfs-snapshot list
Available snapshots:
@apt-snapshot-2013-05-20_19:55:47
@apt-snapshot-2013-05-20_19:55:48
@apt-snapshot-2013-05-20_19:55:49
@apt-snapshot-2013-05-20_20:13:56
@apt-snapshot-2013-05-20_21:23:30
root@ventrical-desktop:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
root@ventrical-desktop:~#
and now back to saucy
Code:
root@ventrical-desktop:~# apt-btrfs-snapshot list
Available snapshots:
@apt-snapshot-2013-05-20_19:55:47
@apt-snapshot-2013-05-20_19:55:48
@apt-snapshot-2013-05-20_19:55:49
@apt-snapshot-2013-05-20_20:13:56
@apt-snapshot-2013-05-20_21:23:30
root@ventrical-desktop:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
root@ventrical-desktop:~# mount /dev/sda1 mnt
mount: mount point mnt does not exist
root@ventrical-desktop:~# mount /dev/sda1 /mnt
root@ventrical-desktop:~# mv /mnt/@ /mnt/@_saucy
root@ventrical-desktop:~# mv /mnt/@apt-snapshot-2013-05-20_21:23:30 /mnt/@
Re: btrfs restores busted saucy desktops
Seamless development cycle ping-pong!:)
Code:
ventrical@ventrical-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10
Codename: saucy
ventrical@ventrical-desktop:~$
therefore , hypothetically and also, snapshots can be used from various distribution cycles eliminating the need for added or extended partions.
I am just baffled that this worked. Kudos to the developers of this little program.
Please note that I did not use an ext4 partion addon on this drive. It was pure root btrfs.
This would mean that I could 'rollup' a btrfs snapshot if it was created on a similar system - or across mutiple like systems it could be netcast almost like acronis or Norton Ghost.
How sweet it is.
Regards,
Ventrical
Re: btrfs restores busted saucy desktops
@ventrical
I am following your threads but following does not mean understanding. A question came to me over the weekend. We are agreed that an Ext4 boot partition would not be included in the btrfs snapshot. Which means we will not be able to roll back to an earlier (working kernel). So, my question, imagine 3 btrfs partitions - boot, root (/) & home. Would one snapshot cover all 3 partitions? Or would three separate snapshots be needed?
I suppose it depends on what we want to safeguard, the home folder or the system. What if the home folder was safe and it was just the OS that was broken? I do not much like the idea of doing a roll back that included the /home partition and then found that my documents were at an earlier stage of work.
Supposing we need a non-btrfs boot partition how much of a problem would that be? All the previous kernels would be there. We would need to match the snapshots with the kernels and then after rolling back boot into the matching kernel. I am thinking that this might be a solution.
So, you have confirmed that 1 x hard disk + 1 x Ubuntu + all btrfs = successful installation?
Book him Dan-o!
Re: btrfs restores busted saucy desktops
@grahammechanical
Quote:
So, my question, imagine 3 btrfs partitions - boot, root (/) & home. Would one snapshot cover all 3 partitions? Or would three separate snapshots be needed?
Your question perplexes me. From my minimal experience with apt-btrfs-snapshot I would tend to assume that each partiton could facilitate it's own working snapshot. I would also assume that only one snapshot could be migrated to all three partitons.
On this particular install I have only one partiton on a 40GB hdd and that is a btrfs partition. To my bewliderment I did not need an Ext4 partition to be able to perform this rollback - rollup proceedure.
---
Allow me explain one point here. Since I am trying to streamline this proceedure I installed small programs like 'htop' to create a snapshot of the given install or 'synaptic' as with which I installed and created snapshot while in raring . Remember ... we have to use 'apt' to create a snapshot while apt-btrfs-snapshot is installed.e.g. after the fresh install of raring on a btrfs partiton I then installed 'synaptic' using : sudo apt-get install synaptic in terminal. ( I did not want to do a big upgrade of raring). After the snapshot was created I then removed apt-btrfs-snapshot (but I took a shortcut and installed nividia driver first before I removed apt-btrfs-snapshot and that explains the 3 extra snapshots of raring - calling apt using a script in software sources in the background). Next I then changed the sources.list and then upgraded to Saucy Salamander. After reboot I am in Saucy Salamander with the added caveat that all my firefox tabs are still there (and whatever else migrated with it). THEN I reinstalled apt-btrfs-snapshot and then used apt to create a snapshot of the Saucy Salamander Install- My code was:
sudo apt-get install htop
I did not want to do a big update of Saucy so I just chose a little file which of course would need 'apt' and call apt-btrfs-snapshot.
Now .. the phenomenon is that there is some sort of global back-threading going on because when I rolled back to the Raring install using the very first snapshot on the list, I had found that apt-btrfs-snapshot was still installed!! (which was removed before upgrade to saucy.)
I thought to myself .... 'what kind of image rollback is this?' and so presumed that the snapshot process is defintely dragging some system folders from @Home or elsewhere. Of course this is all still experimental. The thing is that GRUB , while running in the background during the upgrade process to saucy recognized and reported the raring kernels (yes there were two Raring [3.8.x.x] and how they got there is beyond me because I do not recall updating) . GRuB will not appear during boot process while holding down shift key. It comes up with verbose statement of Grub Loading... but goes right to 'searching for btrfs filesystem ... etc..
Quote:
I suppose it depends on what we want to safeguard, the home folder or the system. What if the home folder was safe and it was just the OS that was broken? I do not much like the idea of doing a roll back that included the /home partition and then found that my documents were at an earlier stage of work.
That is an excellent question but I must admit that I did not do this experiment to cover that particular aspect point. I am generally trying to prove that I can roll back from one release and roll up to another . I am certain that btrfs was not designed for the experiment that I carried out, but it did work. I was also able to successfully roll back to an original install (in the other thread) while having an ext4 partition on the same disk (but here again I did not take the time to notice if there were documents in earlier stages of development.
Quote:
Supposing we need a non-btrfs boot partition how much of a problem would that be? All the previous kernels would be there. We would need to match the snapshots with the kernels and then after rolling back boot into the matching kernel. I am thinking that this might be a solution.
I guess I loosely assumed that the apt-btrfs-snapshot tool would auto-bind with the appropiate kernels , that process being embedded within it's algorithm.
Regards,
Ventrical