Forum
« SalineOS backup »

Welcome Guest. Please Login or Register.
May 23, 2013, 9:12pm



Return to or visit the SalineOS webpage

Forum :: General :: Testing and Development :: SalineOS backup
Page 1 of 5 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]
 AuthorTopic: SalineOS backup (Read 1,784 times)
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 SalineOS backup
« Thread Started on Mar 12, 2012, 2:12pm »

SalineOS backup has been in git a few days, but now it is officially usable.

SalineOS backup is a program written in bash and yad that allows you to compress your entire system into a single file, and restore that file into a usable system to a partition or partitions of your choice. The restoration process is much like a stripped down version of the SalineOS 2.0 installation process. SalineOS backup will allow you to create backup files of the instance it is running from, or another Linux based distribution on your disk(s). SalineOS backup will work with most all modern distributions of the Linux operating system, but not all of them. In order for SalineOS backup to successfully create and restore a backup file for a Linux instance on your disk(s), that distribution must support, the ext4 filesystem, mounting disks with standard UUID identifiers and the GRUB2 bootloader. The Linux instance you wish to backup can use anywhere from one to three partitions, one for root, one for /home and one for swap.

Testing is needed on this script since it is hot off my keyboard, and only been tested to work so far on SalineOS 1.6. SalineOS backup does not exactly replace Remastersys, as it will not support distribution mode or creating live disks at all. Right now I am unsure if I will ship Remastersys pre-installed on the 2.0 images. I will however host packages for Remastersys on the SalineOS repositories for 2.0.

Expect 2.0 to ship with a Thunar custom actions that will allow you to start a restoration by right clicking on a .backup file :)
Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #1 on Mar 12, 2012, 3:24pm »

Hello,
Running Sos1.6 uptodate. Ran salineos-backup as root with no parameter,
gets me in a loop between lines 1015 and 1027.

Have not been able to get yad to install.

Suggestions from http://www.linux-magazine.com/Online/Blo....Script-with-YAD
has led to run ./configure, install something, then ./configure again, but haven't find gtk+-2 yet....
« Last Edit: Mar 12, 2012, 3:26pm by Richard »Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: SalineOS backup
« Reply #2 on Mar 12, 2012, 3:33pm »

To install yad the easy way, add this to /etc/apt/sources.list:
deb http://debs.slavino.sk stable main non-free

Run aptitude update.
Apt will complain about a missing key, to fix that simply run:
gpgimport TheKeyItComplainsAbout
Then run aptitude install yad

Without yad installed the script will in fact run in an infinite loop. Because $Operation will equal "" forever since yad isn't around to ask you for it.
« Last Edit: Mar 12, 2012, 3:34pm by Anthony Nordquist »Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #3 on Mar 12, 2012, 4:35pm »

Thanks. That work's much better.

I'll run it tonight at bedtime. :)
« Last Edit: Mar 12, 2012, 4:37pm by Richard »Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #4 on Mar 13, 2012, 6:13am »

Umm. Ran to completion according to the dialog,
but can't find the file in the directory I designated?
Curious. Must be somewhere on the disk. I'll search
more this afternoon.
Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
ukbrian
Senior Member
****
member is offline





Joined: Aug 2011
Gender: Male
Posts: 285
 Re: SalineOS backup
« Reply #5 on Mar 13, 2012, 8:19am »

I'll give SalineOS backup a run but I just hosed my SalineOS install on my one machine so I need to do a fresh install. I could take a snapshot of my other machine and install that but I thought after 7 months of faithful, trouble free service a fresh install wouldn't hurt.

I can't recommend SalineOS highly enough, by far the best and most reliable Linux OS I've used.

Many hearty congratulations Anthony :)
Link to Post - Back to Top  IP: Logged
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: SalineOS backup
« Reply #6 on Mar 13, 2012, 3:31pm »

Richard, there have been issues with the progress bar I thought I had all sorted out. I have just added a couple patches that hopefully fix it up. I also missed a set of quotes that have since been added, this should fix issues with selecting a folder with spaces in the name.
Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #7 on Mar 13, 2012, 4:45pm »

Fine, I'll pull it down and run it this evening.
I have about 5.1 GiB in my / partition. It takes a while to run.
Does the .backup have to be run all at once or can I pick and choose.
In other words, can it be a virtual file system like zip or tgz?
Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: SalineOS backup
« Reply #8 on Mar 13, 2012, 7:13pm »

It does have to be built all at once, there "may" be a way to "Update" a .backup file with only files that have changed since it was created. Right now the .backup files are squash filesystems, using as high a compression ratio that I can. The reason for using squash and not tar.gz or .7zip is simply the matter that squash filesystems can easily be mounted as loop devices.

This makes installation quite a bit easier, especially it you have to do the restoration from a live environment. If I used .7zip files I would have to uncompress them into RAM (Requiring a whole hell of a lot of RAM) and then rsync them from RAM to disk. This way is simple, I just mount the .backup file as a loop device and rsync it directly to the target disk, then chroot into it and create new fstab files, fix permissions and install grub.

On Windows most backup software actually creates several archives and extracts them to RAM one at a time and copies the files, then clears the RAM for use by the next archive. This isn't exactly the route I wanna go, since my way is more flexible, if you want to get a single file out of your backup you can. Simply run mount ./name.backup /mount-point -o loop

Making the backup is in fact a fairly slow process, it requires moving all your data and compressing it at the same time. The actual time it takes is dependent on your processor, read and write speed of your storage media and the amount of data you are backing up. You can probably get more speed by saving the .backup file to a different disk than the partition you are backing up resides on.

For those that are interested, the maximum size of the backup you can make with SalineOS backup is 16 EiB or 1,152,921,504,606,846,976 x 16 bytes.
« Last Edit: Mar 13, 2012, 7:15pm by Anthony Nordquist »Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #9 on Mar 13, 2012, 7:28pm »

Anth,
salineos-backup ran to completion again. The file was named with Time: 1729* but I can't *find* it.
Searched the whole hard disk. I'm sure it built, but for some reason didn't write or the name is nulls?
It took about 2 hours, I think. :) I thought maybe the xscreensaver had caused a problem. Do you think it could have?
Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: SalineOS backup
« Reply #10 on Mar 13, 2012, 8:11pm »

Try opening catfish and setting it to search in File System, for the search term put .backup. Even if Xscreensaver outright stopped mkquashfs then there would still be a partial file in the spot it is suppose to be. I had to kill some operations manually during testing, using killall -KILL mksquashfs and there was always a file of at least a few hundred megabytes left where it was suppose to be.

Out of curiosity what folder are you trying to save it to?
Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #11 on Mar 14, 2012, 4:52am »

Set to store it into /data/cds/SalineOS-Backup/1729* using the Time option name.
It is on my ext4 data partition. It is a non-standard entry in the root file system.
Catfish didn't find anything of any size using "1729*"
Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,338
 Re: SalineOS backup
« Reply #12 on Mar 14, 2012, 5:58am »

The only recommendations I can make are to use catfish to search for .backup in your filesystem and to run salineos-backup in a terminal and post the output for me.
Link to Post - Back to Top  IP: Logged
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #13 on Mar 14, 2012, 6:28am »

OK, will do.
I ran it on another linux installation and it produced the file, mounted it but didn't open --but maybe missing command.

In a terminal, gives this (but maybe because other files are open?)

root@CORE2SOS:/home/richard# salineos-backup
:: chose file and named with time, then started even though files open:
Cannot stat dir/file //home/richard/.gvfs because Permission denied, ignoring^C
root@CORE2SOS:/home/richard#

Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Richard
Elder Member
*****
member is offline

[avatar]



Joined: Jan 2011
Gender: Male
Posts: 593
Location: Venezuela
 Re: SalineOS backup
« Reply #14 on Mar 14, 2012, 6:30am »

@ukbrian,
I agree wholeheartedly. It is fast and reliable. And I like the tweaks.
Link to Post - Back to Top  IP: Logged

SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae;
SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae
LinuxMint-14, Xfce4.10, w/3.5.0-17-generic
Page 1 of 5 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]



Anthony Nordquist, on behalf of the SalineOS project, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. As such, if you click the above banner and then make any purchase including digital downloads, a small percentage will be paid to the SalineOS project.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile