snap2 rotating snapshot backups for Puppy

Miscellaneous tools
Message
Author
User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#141 Post by johnywhy »

Thanks for reply and info!

Anyone know of an "incremental" or differential backup method that can work with a single file? (such as the PSF, for example :). To backup just the changed parts of an individual file?

The PSF is already compressed, right?

Cheers!

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#142 Post by don570 »

Anyone know of an "incremental" or differential backup method that can work with a single file?
There's the 'diff' command and then you use the 'patch' command

A bit complicated to use :cry:

For instance when a patch is applied to source code by a
programmer. This is the command I used to
apply a patch to mtpaint before compiling.

Code: Select all

patch --input=/mnt/sdc1/tablet_test.patch --directory=/root/mtpaint3.34.56/src

http://linux.about.com/library/cmd/blcmdl1_diff.htm

http://linux.about.com/od/commands/l/blcmdl1_patch.htm

_________________________________________________
Last edited by don570 on Sat 26 May 2012, 16:55, edited 2 times in total.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#143 Post by johnywhy »

That rocks. Cannot wait to try it! Thanks!

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

rdiff-backup

#144 Post by lstandish »

I think rdiff-backup would also work to keep one current copy of the puppy save file, and "binary diffs" that would allow recovery of a previous save file. From the program's features page:

"Space efficient: Suppose you have a large database file that changes a little bit every day. A normal incremental backup would keep saving copy after copy of this database, wasting a lot of space. rdiff-backup uses librsync, which implements the same efficient diffing algorithm that rsync uses. It works on binary files as well as text, so only a fraction of the data in your database would be saved in each incremental backup."

(As it says above, snap2 would store "copy after copy" of any large file - like the puppy save file - that changes.)

I found this here: http://www.nongnu.org/rdiff-backup/features.html

I don't know whether or not there is a Puppy pet, but I think rdiff-backup can be installed easily on Puppy.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Question

#145 Post by peebee »

A quick question if I may....

I've got Snap2 backing up from my working disk sda1 to my backup disk sdb1 at 19.00 each day.

All seems to be fine except that in my backup directory there is a directory for each day/backup which seems to contain just an empty /mnt directory - see screenie attached.

Can I safely delete all these daily directories??

Many thanks
Cheers
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#146 Post by lstandish »

With snap2, you can always safely delete any backup, unless it contains data you need. However, note that if you have empty daily.x directories, you probably have a misconfiguration. Check your latest backup (recent.1). If it is contains what you expect, you can probably conclude that your current configuration is OK.

In your screenshot I see a number of Backup_<date> directories. Those were created by a different backup program, right?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#147 Post by peebee »

lstandish wrote:In your screenshot I see a number of Backup_<date> directories. Those were created by a different backup program, right?
Hi lstandish

Thanks for the reply - no other backup program is in use - all those directories - 1 per day at 19.00 since I started using snap2 - are created by snap2 - they appear to be empty except for an empty /mnt directory in each.

The daily.x directories have the expected content.

Thanks
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#148 Post by lstandish »

Something is fishy - snap2 doesn't create any directories called "Backup_<date>", not even temporary directories. Can you send me your /.snap2/default.set directory (compressed), maybe via PM?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#149 Post by peebee »

lstandish wrote:Something is fishy
OOOPS!

Profound apologies - my bad - looks like there was a pschedule task lurking from when I tried pbackup.

Really sorry to have bothered you!!!

Thanks
Peebee
Attachments
capture7699.png
(20.72 KiB) Downloaded 473 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
Pete22
Posts: 264
Joined: Fri 08 May 2009, 22:59
Location: Utah, USA

Does snap2 work on ext 4

#150 Post by Pete22 »

Hello lstandish,

I am going to bite the bullet and do what I should have been doing all along.
That is backing up. My system is Lhp 64 on ext.4
Does Snap2 work on ext.4 or should I reformat and go with ext.3?

Thanks so much for a nice program.


Pete

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#151 Post by lstandish »

Hi Pete,
ext 4 should be fine. snap2 is a frontend to rsync, so I think it will work on any file system that support hard links, which is all Linux filesystems, I believe.

User avatar
Pete22
Posts: 264
Joined: Fri 08 May 2009, 22:59
Location: Utah, USA

Thanks

#152 Post by Pete22 »

That's wonderful news.

My next step is to get it setup and working.


Pete

Jasper

#153 Post by Jasper »

Hi,

I use Snap2 with ext4. It's superb, reliable and fast - it even reports how fast - the incremental option is usually >100 times faster than a full backup.

My regards

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#154 Post by lstandish »

I'm glad you've found the program useful, Jasper.

Do you (or anyone else who reads this forum post) use snap2 to backup to *remote* media via Internet? This would normally be to a VPS (virtual private server) or a dedicated sever.

I ask because in the years since I wrote snap2, I've never heard that anyone (besides myself) has used the backup-to-remote-server option.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#155 Post by peebee »

Hi lstandish

I'm a happy user of snap2 on Slacko 5.3.3 at the moment.

I've been looking into upgrading to a more recent Puppy - and the one that seems to meet my needs is the LxPup variant of Precise.

I've been trying to get Snap2 running today and have run into problems, so I'm wondering if you can advise?

On LxPup (and also on Upup Precise that LxPup is built on) I get gui problems.

I've spent all day looking at your gtkdialog code but have come to the conclusion that I'm unable to work out what's going wrong.

What I've done is replace all occurrences of GTKDIALOG with GTKDIALOG -d in /usr/bin/snap2 and then run snap2 in a terminal - the output is:

Code: Select all

sh-3.00# snap2
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_entry_refresh(): <label> not implemented for this widget.
widget_combobox_input_by_command(): <input> not implemented for this widget.
/usr/bin/snap2: eval: line 660: syntax error near unexpected token `<'
/usr/bin/snap2: eval: line 660: `<window title="snap2 v4.25 | User root | Settings: default.set"><hbox><vbox><text use-markup="true"><label>"<b>Backup Configuration in 4 Easy Steps</b>'
I'm wondering if the multi-line text message in ADD_DIALOG is throwing it?

The version of GTKDIALOG in LxPup is:
sh-3.00# gtkdialog -v
gtkdialog version 0.8.3 r473M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade.
Hope we can work out whats wrong and get it going
Cheers
peebee

p.s. Snap2 4.25 works OK in Precise 5.4.1 with gtkdialog version 0.8.0 (C)

Snap2 4.25 run from terminal in Slacko 5.3.7.7 gives similar "not implemented for this widget" errors but works. gtkdialog version 0.8.2 r455M (C) Built with additional support for: Glade, VTE.
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Problem update

#156 Post by peebee »

Update on my problem above....

After lots of testing and dialogue with Thunor - gtkdialog guru - it would appear that there are some versions of gtkdialog (a version of gtkdialog that is r472 to r482 inclusive) where Snap2 does not work properly - however it does work with earlier versions and with the latest version as at 12/12/12 - r493

If you have problems with Snap2 then you may need to downgrade or upgrade the version of gtkdialog on your Puppy.

In tracking down this conclusion, Thunor has recommended the amendments shown below to /usr/bin/snap2 (which improve it but do not cure the underlying problem).

Thunor explains the changes:
http://www.murga-linux.com/puppy/viewto ... 8&start=22

These changes have been incorporated into the /usr/bin/snap2 in the attached pet WHICH ONLY CONTAINS THE UPDATED /usr/bin/snap2.

Cheers
peebee

Changes:
Move the "Select a Directory" text at line 478 into the entry tag using fs-title=\"Select a Directory\" and delete the <label></label>.
Do the same at lines 500 and 517.

at line 631 is "<input>ls</input>" just remove it

You should try adding " | grep =" to the end of the GKDIALOG part so that you'll get something like:
Code:
for STATEMENTS in $($GTKDIALOG --program=MSG_DIALOG | grep =); do

There are seven of them, search for "eval".
Attachments
snap2-4.25-update.pet
Slightly changed version uploaded after download #5 - sorry!
(15.75 KiB) Downloaded 714 times
Last edited by peebee on Thu 13 Dec 2012, 19:42, edited 1 time in total.
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#157 Post by thunor »

@peebee

I've just had a look at the snap2 source within your pet and you've left the test code in there that I gave you, this at line 654:

Code: Select all

$GTKDIALOG -v; echo "$MAIN_DIALOG" > /tmp/snap2_MAIN_DIALOG; $GTKDIALOG --program=MAIN_DIALOG; exit
It's not meant to be left in there. Maybe I should've mentioned that it's only test code, it was simply for you to gain access to the otherwise obscured output and send it to me. Anyway, you ought to remove it. The rest of it looks fine.

If anyone has installed the above update then simply open /usr/bin/snap2 and remove that line at 654.

Regards,
Thunor

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#158 Post by peebee »

thunor wrote: you've left the test code in there that I gave you, this at line 654:
OOOOps...sorry....

Pet amended and reuploaded after download #5 - apologies to those who have downloaded.....

PeeBee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Version 4.26

#159 Post by peebee »

This version makes snap2 scheduled backups consistent with the cron / pschedule configuration in woof-ce built puppies.
Attachments
snap2-4.26.pet
(30.17 KiB) Downloaded 297 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

snap2 version 4.27

#160 Post by rerwin »

This version adds internationalization. This is a collaborative project with L18L and esmourguit. Many thank-yous for their efforts and assistance.
Richard
Attachments
snap2-4.27.pet
Internationalized
(35.57 KiB) Downloaded 135 times

Post Reply