Ask your questions here.
Post a reply

Can you install RefractaShapshot on existing Debian 7 server

Mon Dec 01, 2014 9:40 pm

We set up a home theater backend using TVHeadEnd installed on Debian 7. We did not install a desktop because TVHeadEnd doesn't need it, so use of a GUI-based backup program is out. I asked in a Debian forum whether there is a relatively easy way to create a full backup in the form of an ISO or IMG file that could be used to completely restore the system (we were going to use Mondo Rescue but it appears not to work with Debian 7, and also the version they are offering now loads a lot more questionable dependencies than it used to). Someone in the Debian forum recommended RefractaShapshot but there are several things I don't understand about it:

    Is there a version that will work Debian 7 (Wheezy)? If not then my other questions are moot.
    Can it be installed as a standalone program, without installing a full Refracta package?
    If the answer to both of the above is yes, then where can the standalone package that will work with Debian 7 be downloaded, and how do you install it?
    And, where are the usage instructions for RefractaSnapshot?

My goal would be to be able to make automatic weekly backups of the system to an ISO file (preferably) or an IMG file that could be used to restore a full working system. At the same time I would like to be able to exclude the contents of directories that only hold media, in order to save drive space on the backup drive. Can RefractaSnapshot do that? I know how to set up a cron job if that's a necessary part of the mix, but I don't know where to find or how to install RefractaSnapshot, nor do I know what command and options I'd need to use to get the backup.

Re: Can you install RefractaShapshot on existing Debian 7 se

Mon Dec 01, 2014 10:13 pm

I use these tools on both Debian Squeeze and Refracta Wheezy. fsmithred will tell you which versions are compatible with Debian 7. In the meantime here is the documentation in case you haven't found it yet:

http://www.ibiblio.org/refracta/docs/re ... apshot.txt
http://www.ibiblio.org/refracta/docs/re ... taller.txt

You can set the configuration to exclude whatever you want. My Squeeze install is @260GB but my snapshot iso is @2gb. That boots to a working system that would also install easily. Of course almost all of my files are backed up elsewhere and they can be copied to a reinstall. I only keep essential files in the snapshot.

HTH

Re: Can you install RefractaShapshot on existing Debian 7 se

Mon Dec 01, 2014 11:11 pm

You can use refractasnapshot-base and refractainstaller-base from this page -
http://sourceforge.net/projects/refracta/files/tools/
(Note: newer versions should also work with wheezy, but there's a problem with the way the dependencies are listed, and the latest refractasnapshot won't install on wheezy without forcing it.)

Install them as you would any other debian package.
e.g. 'dpkg -i <filename.deb>'
There are some dependencies that you may need to install. I'll list them at the end.

As golinux mentioned, you should edit the excludes file to your needs. Also look at the config file to customize settings. The comments are self-explanatory. There's also a readme file in the package.
/usr/lib/refractasnapshot/snapshot_excludes.list
(/)etc/refractasnapshot.conf (the parentheses at the beginning of the path are just there to get around a forum bug that won't allow posts with that particular path.)
/usr/share/doc/refractasnapshot/readme...something or other.
And then run /usr/bin/refractasnapshot

Get the installer, too. It installs exactly what's in the snapshot, with all your installed software and configs.

dependencies:
rsync, squashfs-tools, genisoimage (xorriso in the latest versions), live-boot, live-config, live-boot-initramfs-tools, live-config-sysvinit, syslinux, syslinux-common (and isolinux as a separate package in jessie).

Re: Can you install RefractaShapshot on existing Debian 7 se

Tue Dec 02, 2014 6:32 pm

fsmithred wrote:... the latest refractasnapshot won't install on wheezy without forcing it.


I am relatively new to Linux and I don't understand this. Sorry.

I am assuming the package to install would be the non-gui package, which at this time is refractasnapshot-base_9.0.9-7_all.deb, correct? So if I just did 'dpkg -i refractasnapshot-base_9.0.9-7_all.deb', wouldn't that work? If not, what is meant by "forcing it"?

fsmithred wrote:Get the installer, too. It installs exactly what's in the snapshot, with all your installed software and configs.


What installer are you referring to? And, are you saying that this is a package to that is needed to restore a system from the backup? The problem with that is I wanted to create an iso file that could be used as an installer, in case the system was completely non-functional, so you would put it on an external drive or memory stick, depending on the size of the file, and boot from that and it would just reinstall whatever was on the system at the time of the previous backup. If the system is non-functional then there would not be a way to run an installer.

fsmithred wrote:dependencies:
rsync, squashfs-tools, genisoimage (xorriso in the latest versions), live-boot, live-config, live-boot-initramfs-tools, live-config-sysvinit, syslinux, syslinux-common (and isolinux as a separate package in jessie).


So I would assume xorriso rather than genisoimage, since I am running Debian 7.7, but since I am running wheezy and not jessie, would I still need isolinux?

Also, I was looking at the page at http://www.ibiblio.org/refracta/docs/re ... taller.txt and one thing there confuses me. It says, "Simple install puts the bootloader in the mbr of /dev/sda and lets you choose a single partition for the installation. That partition will be formatted as ext3." I would assume (hope) it is talking about the destination ISO file, and not that it is changing the mbr on the drive you're installing RefractaSnapshot on. Is that a correct assumption?

Thank you, guys, for the information, but I'm beginning to think that perhaps installing RefractaSnapshot may be a little beyond my ability level in Linux right now. From what I am reading, I suspect that the program was written for an older version of Debian, and that trying to install it under Debian 7.7 may cause errors or problems that I won't be able to work around, and I really don't want to dig myself into a deeper hole than I am already in.

Re: Can you install RefractaShapshot on existing Debian 7 se

Tue Dec 02, 2014 10:52 pm

Debra, all else aside, the "non-gui" version of the refractasnapshot script still contains inline prompts requiring user input.
The script could be tweaked so that runs fully automated but, as is, it is not suited to serve as a crontab task.

Having a snapshotted iso in hand isn't sufficient in the event of hardware failure. You'll require an "installer" to restore (er, clone) the image onto new hardware.
Yes, formatting the targeted destination partition on the new hardware is a step performed during an installation.

Except for the cron automated aspect of your intended use, I believe the following workflow would accomplish your goal:
1) install .deb packages "refractainstaller", "refractasnapshot", "refracta2usb"
2) edit the refractasnapshot "excludes file", adding paths to the (replaceable) media files you've mentioned above
3) create an iso by using refractasnapshot
4) create a bootable pendrive by feeding the iso to refracta2usb

At this point, (providing that your TVHeadEnd system can boot from USB) you will be able to "test your backup" by adjusting
the BIOS boot order to prefer USB over HDD or by just temporarily uncabling the hard drive while testbooting from pendrive.

In the event of hard drive failure, you would boot from the pendrive and run "refractainstaller" to restore your snapshotted system into the partition of a new hard drive.

====================

note to devs:
One of the refractasnapshot "inline prompts" is conditional, based on availability of "cpulimit".
The wording of that prompt ("Your CPU will not be limited.") begs better explanation.
(something like "is a CPU-intensive operation...recommend closing other apps before proceeding...")

Re: Can you install RefractaShapshot on existing Debian 7 se

Tue Dec 02, 2014 11:55 pm

Refractasnapshot does *not* format anything nor does it touch your mbr. It mirrors your running system (except excluded files/directories) to a self-contained, bootable iso.

Refractainstaller should be installed to the running system before you make your snapshot. It does *not* format disks nor interfere with mbr except when invoked from the booted iso. You can't install the iso later with no installer!

Dependencies: "isolinux" is not in Wheezy (it is included in "syslinux" pre-Jessie). Only refractasnapshot "Testing" versions need xorriso. You do need genisoimage.

Without gui, other options are limited, beyond writing a custom rsync script. Your choice.

Re: Can you install RefractaShapshot on existing Debian 7 se

Tue Dec 02, 2014 11:58 pm

You've wasted your time . . . at least as far a Debra is concerned. See this and posts following.

Re: Can you install RefractaShapshot on existing Debian 7 se

Wed Dec 03, 2014 12:24 am

Thanks, thwak. I missed the part about automating it. Good catch.

Debra, the version you're getting is for wheezy (Debian 7.x). It's not one of the latest versions (for jessie/sid) so you don't need to worry about forcing it. I mentioned that mainly for other people who might read this thread. 9.0.9 uses genisoimage. There is no separate isolinux package in wheezy - it comes with syslinux. If you try to install the .deb package without those, you'll get an error message that tells you what packages are missing.

You can find refractainstaller-base on the same page that I linked. You can also find refracta2usb there, but that one requires a gui. If you want to put the bootable image on a usb stick, you'd have to do it with the dd command.

If you just want this for backup purposes, there are easier and better ways. For a manual backup, I recommend clonezilla - you boot a live-CD and then back up either partitions or the entire drive to some backup medium (external drive is a good choice.)

For setting up something to run automatically and back up to another hard drive or another computer on the local network, deja dup (pretty easy) or grsync are good. There are others. Damn. Scratch those last two - they need a gui. But it might be possible to run them from another computer on the local network and "pull" the backup from your server, instead of running the backup program on the server.

If you're going to set up a cron job, you may as well learn tar or rsync, and have your cron job run one of those. And then you won't be a novice anymore.

There are some good discussions about backup methods and strategies at forums.debian.net. You might want to read some of those while you're rethinking this.

Re: Can you install RefractaShapshot on existing Debian 7 se

Wed Dec 03, 2014 1:11 am

Please look at the link in the post above. I doubt that all the patient instruction in the world work for her. Maybe for someone else in the future though . . .

Re: Can you install RefractaShapshot on existing Debian 7 se

Wed Dec 03, 2014 4:35 am

@thwak:
The only way you should get the cpulimit message is if you went into the config file and turned it on. Is the explanation in the config file not sufficient? Or did you get that message without setting limit_cpu to "yes"?
Post a reply