
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
RetrospeKt is my attempt to make working with backups easier and more
intuitive. It is inspired by Apple's "Time machine" backup system and
is based on rsnapshot backup script.
The main advantage comes from using the hard links in backup snapshots. The snapshots are not archived/compressed in any way so with Retrospect you can easily
browse your folders (in konqueror) as they were at any previous backup
point. If you are using the Strigi desktop search, you can now search not only the current disk state but all the past disk states!
A simple konqueror service menu entries are also provided for:
* restoring files from backups
* comparing any two versions of a text file with the excellent Kompare
(see exactly what you changed and possibly un-apply those changes)
* browsing all the versions of the selected file
* finding all the deleted files in the current directory
* listing all the changes made on the selected file/directory (journal)
Now there is also included an extremely simple rsnapshot configuration utility. You just select the directories to backup, where to backup and how often to backup and the scripts will (should) take care of the rest! :)
TO INSTALL:
For full functionality make sure you have kommander, rsnapshot, kdialog, konqueror and kompare insalled.
Uncompress anywhere and run the 'install' script. Provide your root/user password when asked by kdesu.
KNOWN ISSUES:
Rsnapshot does not handle links correctly. For example, if your /home is a link to /disk2/home then please backup both the link (/home) and the actuall data (/disk2/home).
Any feedback much appreciated!
13 years ago
0.11
- cool new timeline style! (see the TIMELINE.readme or Help.html)
- Search renamed to Find
- Find: full (optional) regex support
- Find: can easily list all the files in the current directory with all the
versions of each file and all the deleted files (see Help!)
- Find: should be a bit faster (but still can take a long time)
- bug: correct nfs support (thanks dreadhead!)
0.10
- NEW! Search - locate all the files (even deleted!) that match the search string
(all the different versions of each file are also shown)
- directories are now marked in the journal
- a few cosmetic changes on the timeline
13 years ago
0.11
- cool new timeline style! (see the TIMELINE.readme or Help.html)
- Search renamed to Find
- Find: full (optional) regex support
- Find: can easily list all the files in the current directory with all the
versions of each file and all the deleted files (see Help!)
- Find: should be a bit faster (but still can take a long time)
- bug: correct nfs support (thanks dreadhead!)
0.10
- NEW! Search - locate all the files (even deleted!) that match the search string
(all the different versions of each file are also shown)
- directories are now marked in the journal
- a few cosmetic changes on the timeline
miguipda
12 years ago
perfect program but need to be compiled as module for slax.
http://www.slax.org/documentation_create_modules_rules.php
Sincerely thanks.
Have a nice day.
Report
reggler
12 years ago
I just installed retrospekt and it told me i need to run retroskept-config first. When i do that, nothing really happens all i get is:
reg@desktop-reg:~/downloads/retrospekt> ./retrospekt-config
root: /.snapshots/
d:7 w:4 m:0 y:0
backup: /home/
backup: /etc/
backup: /usr/local/
Wwhat am I doing wrong?
Thanks!
Report
roudoud0u
13 years ago
Thanks for this kde apps but i'm just wondering if it's still developped/maintained ?
Thanks.
Report
deech
12 years ago
deech
Report
astromme
12 years ago
I would love to have a desktop antagonistic backup service but still have the integration of configuration interfaces tied to DEs.
Report
bsander
13 years ago
When I manually type in the path everything goes fine btw.
Incidentally, in my konsole there are a lot of messages like this:
kmdr-executor: WARNING: Pixmap not found for mimetype inode/directory
but I don't think that really has something to do with my problem, does it? :)
Report
bsander
13 years ago
Where can I see/change at what time rsnapshot performs its daily run?
Also, I can't seem to add entries to the exclude list. Both the add and remove buttons are grayed out :(
Seems like a very promising app though, I'm looking forward to using it!
Report
dsvilko
13 years ago
As for the exclude list, I haven't yet had time to implement it but it's certainly on my TODO list.
Report
bsander
13 years ago
I thought of some more issues: During installation the dolphin servicemenu couldn't be copied because the d3lphin/servicemenus subfolder didn't exist yet. Now, after I copied it manually, it loads up an instance of konqueror (pointed at my home directory) whenever I use it..
Report
dsvilko
13 years ago
Can you tell me more about the second part of your post as I didn't quite understand it.
This is how it should work:
You open the dolphin and select (hover over) a directory. Select the 'retrospekt timeline'. Timeline should appear together with a konqueror window opened to the selected directory.
Report
bsander
13 years ago
Another thing I noticed (mostly due to the absence of an exclude list), is that when I backup my home directory, stuff like the trash folder also gets backed up. This can be a serious waste of space I think, so maybe it would be nice to include some sensible defaults when you get around to finishing the exclude list :)
Again, thanks for a great job, I'm really enjoying this app so far!
Report
reinderdijkhuis
13 years ago
I didn't get any further than that and wouldn't know how to, as the config screen is the only part of the program that got added to my kicker menu, and typing retrospekt results in display of the "Running retrospekt for the first time?" Dialog.
In all, a big disappointment. I might as well do the rsnapshot.conf file with rsnapshot from the command line.
Report
dsvilko
13 years ago
remote host? RetrospeKt-config doesn't currently support remote backups.
If you know how to configure the rsnapshot by hand (really not that hard) just ignore retrospekt-config. First time you use the retrospekt it tries to detech the correct backup_name and snapshot_root from your /etc/rsnapshot.conf and set the variables in ~/.retrospekt/config (please check that variables are set correctly). Once you have the functional /etc/retrospekt.conf and ~/.retrospekt/conf, retrospkt scripts should work.
Report
dreadhead
13 years ago
It seems to ba a very cool App, but unfortunately it seems to not work here. I've set up retrospeKt using you install script. After that I set the directories to backup and the destination folder via retrospekt-config.
rsnapshot backs up successfully since 2 days now. But the context menu seems to miss the backup location. For example if I click "Move back in time" I get the message: "This directory does not exist in the backup".
If I click "Kompare" on a cerainly changed textfile I get the message: "This is the only version of this file".
Looking into the backup dir, I can see the dirs daily.0, daily.1 and daily.2. When browsing through it I can find the modified file in daily.0 and the original file in the others.
Running retrospect on a Konsole gives me:
BBD: >/mnt/backup/Shadow<
BD: >root<
loaded dcop: konqueror-5471 konqueror-mainwindow#1
Using cached dcop info...
# dcop konqueror-5471 konqueror-mainwindow#1 currentURL
url: /home/dreadhead/Downloads/retrospekt
backup: /mnt/backup/Shadow/daily.0/root/home/dreadhead/Downloads/retrospekt
This are the correct paths... I have to say that my backup folder is a mounted nfs share containig an ext4 file-system. Could this be the problem?
Report
dsvilko
13 years ago
The log you sent me would indicate that no backup folder was found. For a simple 'retrospekt +' (go back in time) the log should look like this:
BBD: >/backup/rsnapshot<
BD: >root<
loaded dcop: konqueror-10326 konqueror-mainwindow#1
Looking for dcop instance...
Konqueror instance: konqueror-5780
tab: konqueror-mainwindow#1 is hidden
Konqueror instance: konqueror-5770
tab: konqueror-mainwindow#1 is hidden
Konqueror instance: konqueror-9051
tab: konqueror-mainwindow#1 is visible
Active window not found, using visible window.
# dcop konqueror-9051 konqueror-mainwindow#1 currentURL
url: /home/dsvilko/bin
backup: /backup/rsnapshot/daily.0/root/home/dsvilko/bin
2007-11-15 11:30 daily.0
2007-11-14 11:30 daily.1
2007-11-13 11:30 daily.2
2007-11-12 11:31 daily.3
2007-11-11 11:30 daily.4
2007-11-10 11:30 daily.5
2007-11-09 11:30 daily.6
2007-11-08 11:30 daily.7
2007-11-07 11:30 daily.8
2007-11-06 11:31 daily.9
2007-11-03 12:16 daily.10
2007-11-02 12:30 daily.11
2007-11-01 12:30 daily.12
2007-10-31 15:33 daily.13
/backup/rsnapshot/daily.0/root/home/dsvilko/bin
dcop konqueror-9051 konqueror-mainwindow#1
My script uses this command to get a list of available backups:
cd /mnt/backup/Shadow; ls -lt --color=none | cut -f6- -d\" \" | grep -
What do you get when you type that in the Konsole (as a user!)? Should be:
2007-11-15 11:30 daily.0
2007-11-14 11:30 daily.1
2007-11-13 11:30 daily.2
...
Report
dsvilko
13 years ago
Report
dreadhead
13 years ago
Yes... the share is user readable. In fact is even user writable. Yes, I can browse it with konqueror/dolphin
if I type the following into Konsole i get nothing:
dreadhead@Shadow /mnt/backup/Shadow $ cd /mnt/backup/Shadow; ls -lt --color=none | cut -f6- -d" " | grep -
Here is the output if I remove the grep at the end:
dreadhead@Shadow /mnt/backup/Shadow $ cd /mnt/backup/Shadow; ls -lt --color=none | cut -f6- -d" "
Nov 16 03:41 daily.0
Nov 15 22:31 daily.1
Nov 15 22:07 daily.2
As it seems the different formatted date is the problem.
I get the right output with the following command:
dreadhead@Shadow /mnt/backup/Shadow $ ls -lt --color=none --time-style="+%Y-%m-%d %H:%M" | cut -f6- -d" " | grep -
2007-11-16 03:41 daily.0
2007-11-15 22:31 daily.1
2007-11-15 22:07 daily.2
Anyway, if I change the line 99 in file "retrospekt" to this:
open T, "cd '$BBD'; ls -lt --color=none --time-style=\"+\%Y-\%m-\%d \%H:\%M"| cut -f6- -d\" \" | grep - |";
it still doesn't work... Any ideas?
Report
dreadhead
13 years ago
Thanks you very much for this cool app!
Report
dsvilko
13 years ago
Report
ptfd9100
13 years ago
Mike
Report
dsvilko
13 years ago
But I guess Dolphin is still very young so there is still hope :)
Report
MamiyaOtaru
13 years ago
Report
bitcrazy
13 years ago
as I'm no perl programmer, there a re some well 'dangerous' parts in the following diffs.
First the crontab will be replaced without asking, second the .kmdr script is assumed to be installed in $HOME/Kommander (what is a minor problem, should work with your install, too)
Okay here are the diffs:
--- retrospekt.orig 2007-11-08 15:11:16.000000000 +0100
+++ retrospekt 2007-11-08 15:15:58.000000000 +0100
@@ -13,11 +13,11 @@
$mon{"11"}="Nov";
$mon{"12"}="Dec";
-# get snapshot_root and backup name from rsnapshot.conf
-$snapshot_root=`cat /etc/rsnapshot.conf | grep snapshot_root | grep -v \\# | cut -f2`;
+# get snapshot_root and backup name from $HOME/.rsnapshotrc
+$snapshot_root=`cat $ENV{HOME}/.rsnapshotrc | grep snapshot_root | grep -v \\# | cut -f2`;
chop $snapshot_root;
$snapshot_root=~s/\/$//;
-$backup_name=`cat /etc/rsnapshot.conf | grep -E \"^backup\" | cut -f3 | head -1`;
+$backup_name=`cat $ENV{HOME}/.rsnapshotrc | grep -E \"^backup\" | cut -f3 | head -1`;
chop $backup_name;
$backup_name=~s/\/$//;
$backup_name=~s/^\///;
@@ -41,13 +41,13 @@
# Variables and values are separated by one white space.
# Snapshot root directory is a directory where daily.0 directory resides.
-# It has the same value as the snapshot_root from /etc/rsnapshot.conf.
+# It has the same value as the snapshot_root from .rsnapshotrc.
# Example: snapshot_root /storage/backup
snapshot_root $snapshot_root
# Backup name is the directory the actuall backup resides inside daily.0
-# directory. It's defined in /etc/rsnapshot.conf, as the second parameter
+# directory. It's defined in .rsnapshotrc, as the second parameter
# in the 'backup' lines:
# backup <what_to_backup> <backup_name>
# Example: backup_name localhost
@@ -58,7 +58,7 @@
EOF
;
close CONF;
- system "kdialog --msgbox 'Running RetrospeKt for the first time?\nRetrospeKt will try to guess the correct values from the rsnapshot.conf\nClose this dialog and run the retrospect again.'";
+ system "kdialog --msgbox 'Running RetrospeKt for the first time?\nRetrospeKt will try to guess the correct values from the $ENV{HOME}/.rsnapshotrc\nClose this dialog and run the retrospect again.'";
#system "kate ~/.retrospekt/config";
exit 1;
}
--- retrospekt-config.orig 2007-11-08 15:11:30.000000000 +0100
+++ retrospekt-config 2007-11-08 15:05:54.000000000 +0100
@@ -5,13 +5,14 @@
system "kdialog --msgbox 'This program requires rsnapshot!\nOn debian/ubuntu type: sudo apt-get install rsnapshot'";
exit 1;
}
-if(! -f "/etc/rsnapshot.conf") {
- system "kdialog --msgbox '/etc/rsnapshot.conf is missing!\n'";
- exit 1;
+
+if(! -f "$ENV{HOME}/.rsnapshotrc") {
+ system "kdialog --msgbox '$ENV{HOME}/.rsnapshotrc is missing!\nCreating it!'";
+ system "cp /etc/rsnapshot.conf $ENV{HOME}/.rsnapshotrc";
}
$n=0;
-$conf="/etc/rsnapshot.conf";
+$conf="$ENV{HOME}/.rsnapshotrc";
open CONF, "$conf";
$daily=0; $weekly=0;$monthly=0; $yearly=0;
while(<CONF>) {
@@ -31,7 +32,7 @@
}
close CONF;
-open W, "kmdr-executor /usr/local/share/retrospekt/retrospect.kmdr |";
+open W, "kmdr-executor $ENV{HOME}/Kommander/retrospekt.kmdr |";
while(!$kmdr) {
$kmdr=`dcop | grep kmdr-exec`;
@@ -64,10 +65,9 @@
close W;
if($saved) {
-# system "mv $conf $conf-old";
$snapshot_root=~s/\/$//; $snapshot_root="$snapshot_root/";
print "Saved\n";
- open CONF, ">/tmp/rsnapshot.conf";
+ open CONF, ">/tmp/rsnapshotrc";
open OLDCONF, "$conf";
$interval=0;
while(<OLDCONF>) {
@@ -95,25 +95,18 @@
print CONF;
}
}
- system "kdialog --msgbox 'To install the new /etc/rsnapshot.conf and crontab file, please enter your password on the next prompt!'";
- system "kdesudo -- cp /tmp/rsnapshot.conf $conf";
+ system "cp /tmp/rsnapshotrc $conf";
open CRON, ">/tmp/rsnapshot.cron";
print CRON <<EOF
-# This is a sample cron file for rsnapshot.
-# The values used correspond to the examples in /etc/rsnapshot.conf.
-# There you can also set the backup points and many other things.
-#
-# To activate this cron file you have to uncomment the lines below.
-# Feel free to adapt it to your needs.
EOF
;
- if($daily) { print CRON "30 3 * * * root /usr/bin/rsnapshot daily\n"; }
- if($weekly) { print CRON "0 3 * * 1 root /usr/bin/rsnapshot weekly\n"; }
- if($monthly) { print CRON "30 2 1 * * root /usr/bin/rsnapshot monthly\n"; }
- if($yearly) { print CRON "30 2 1 1 * root /usr/bin/rsnapshot yearly\n"; }
+ if($daily) { print CRON "30 3 * * * /usr/bin/rsnapshot -c $HOME/.rsnapshotrc daily\n"; }
+ if($weekly) { print CRON "0 3 * * 1 /usr/bin/rsnapshot -c $HOME/.rsnapshotrc weekly\n"; }
+ if($monthly) { print CRON "30 2 1 * * /usr/bin/rsnapshot -c $HOME/.rsnapshotrc monthly\n"; }
+ if($yearly) { print CRON "30 2 1 1 * /usr/bin/rsnapshot -c $HOME/.rsnapshotrc yearly\n"; }
+ system "crontab -r /tmp/rsnapshot.cron";
close CRON;
- system "kdesudo -- cp /tmp/rsnapshot.cron /etc/cron.d/rsnapshot";
}
sub dircheck {
$foo=$_[0];
@@ -122,4 +115,3 @@
if($type=~/directory/) { $foo="$foo/"; }
return $foo;
}
-
Hope it helps
Greetings
m0nk
Report
dsvilko
13 years ago
As for the move from root->user, I am really not so sure. I see no advantage and a few serious disadvantages:
- you certainly want to backup /etc (not user readable) if nothing else
- if rsnapshot is not run by root it cannot preserve ownership data even if you have a read permission
- can't efficiently backup more than one user (it's far better to run once than for every user)
I believe it is better to run as root and if you run as root then you _definitely_ don't won't to read the commands from a user writable file (even if you trust that user).
Why do you want a .retrospektrc?
Report
bitcrazy
13 years ago
I only use rsnapshot for backing up some folders in my $HOME directory. I don't use it as root. So retrospekt isn't usable for me in this way. I don't login as root graphically. System's /etc/crontab is only used to run jobs in cron.daily etc. So your approach with kdesu doesn't work. Btw. copying rsnapshot.conf to /tmp, edit it & write it back via kdesu doesn't work here.
I thought your scripts are intended to be used on a per-user basis. Sorry, misunderstood your intention.
But another point:
Your install script copies all files under /usr/local. Perhaps you can use 'kde-config --prefix' to determine the location of KDE? It's still in /opt/kde3 under openSUSE for example. Would be easier for packager.
Greetings
m0nk
Report