On Monday, May 05, 2014 15:09:13 Norbert Zawodsky wrote:
Aus der Webseite von rsnapshot werde ich nicht schlau, was es mit gelöschten Dateien macht. Am Backup ebenfalls löschen oder irgendwo aufheben ??
Aufheben. Rsnapshot legt dir im Wesentlichen ein inkrementelles Backup an. Dabei wird nur kopiert, was sich geändert hat, alles andere wird mit hard links verlinkt. Du bekommst im Zielverzeichnis eine Struktur wie diese: l /media/truecrypt5/Backup/RSnapShot/ total 68 drwxr-xr-x 1 root root 572 Mai 5 16:04 ./ drwxr-xr-x 1 root root 18 Jun 2 2013 ../ drwxr-xr-x 1 root root 16 Mai 4 12:38 daily.0/ drwxr-xr-x 1 root root 16 Mai 3 12:51 daily.1/ drwxr-xr-x 1 root root 16 Mai 2 12:36 daily.2/ drwxr-xr-x 1 root root 16 Mai 1 12:38 daily.3/ drwxr-xr-x 1 root root 16 Apr 30 12:30 daily.4/ drwxr-xr-x 1 root root 16 Apr 29 12:34 daily.5/ drwxr-xr-x 1 root root 16 Apr 28 12:38 daily.6/ drwxr-xr-x 1 root root 16 Mai 5 16:40 hourly.0/ drwxr-xr-x 1 root root 16 Mai 5 12:20 hourly.1/ drwxr-xr-x 1 root root 16 Mai 5 08:35 hourly.2/ drwxr-xr-x 1 root root 16 Mai 5 04:27 hourly.3/ drwxr-xr-x 1 root root 16 Mai 5 00:28 hourly.4/ drwxr-xr-x 1 root root 16 Mai 4 20:26 hourly.5/ drwxr-xr-x 1 root root 16 Mär 30 12:24 monthly.0/ drwxr-xr-x 1 root root 16 Feb 28 12:29 monthly.1/ drwxr-xr-x 1 root root 16 Mai 29 2013 monthly.10/ drwxr-xr-x 1 root root 16 Apr 28 2013 monthly.11/ drwxr-xr-x 1 root root 16 Jan 26 12:37 monthly.2/ drwxr-xr-x 1 root root 16 Dez 29 12:21 monthly.3/ drwxr-xr-x 1 root root 16 Dez 1 12:27 monthly.4/ drwxr-xr-x 1 root root 16 Okt 27 2013 monthly.5/ drwxr-xr-x 1 root root 16 Sep 29 2013 monthly.6/ drwxr-xr-x 1 root root 16 Aug 30 2013 monthly.7/ drwxr-xr-x 1 root root 16 Jul 21 2013 monthly.8/ drwxr-xr-x 1 root root 16 Jun 30 2013 monthly.9/ drwxr-xr-x 1 root root 16 Apr 27 12:36 weekly.0/ drwxr-xr-x 1 root root 16 Apr 20 12:26 weekly.1/ drwxr-xr-x 1 root root 16 Apr 13 12:39 weekly.2/ drwxr-xr-x 1 root root 16 Apr 6 12:28 weekly.3/ In der Konfiguration legst du fest, wie viele Instanzen des jeweiligen Intervalls du aufheben willst. Die Namen sind dabei nur symbolisch, ob das jetzt daily oder monthly heißt, hat nichts mit dem tatsächlichen Intervall zu tun. Welche Namen wann angelegt werden häng alleine an den Konfigurations und Cron-Tab-Einträgen Ich habe in rsnapshot.conf ######################################### # BACKUP INTERVALS # # Must be unique and in ascending order # # i.e. hourly, daily, weekly, etc. # ######################################### retain hourly 6 retain daily 7 retain weekly 4 retain monthly 12 und in /etc/cron.d/rsnapshot (das hier ist ein ubuntu, evtl sind die Pfade auf oS da anders) # 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. 0 */4 * * * root /usr/bin/rsnapshot hourly 30 9 * * * root /usr/bin/rsnapshot daily 0 9 * * 1 root /usr/bin/rsnapshot weekly 30 10 1 * * root /usr/bin/rsnapshot monthly Es wird also alle 4 Stunden ein Abzug gemacht, von denen werden 6 Stück aufgehoben. Beim siebten Durchlauf wird das alte hourly.5 dann gelöscht. Alles, was es bis dahin nicht ins nächste Level geschafft hat, wird verworfen.
Obwohl mich das parsen der --itemize-changes option von rsync schon sehr reizt ....
Na dann, viel Spaß.
Nur habe ich dabei ein Problem zu lösen:
Angenommen /b/h/current/dir1/dir2/dir3/xxx soll gelöscht werden. Ich müsste es daher zuerst nach /b/h/deleted/dir1/dir2/dir3/xxx kopieren. Dafür müssen aber /b/h/deleted/dir1/dir2/dir3 /b/h/deleted/dir1/dir2 /b/h/deleted/dir1
zuvor angelegt werden.,,
mkdir -p /b/h/deleted/dir1/dir2/dir3 legt dir alle „Zwischenverzeichnisse“ von /b bis dir3 an. Gruß mararm -- It's not whether you win or lose but how you played the game. -- Grantland Rice -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um den Listen Administrator zu erreichen, schicken Sie eine Mail an: opensuse-de+owner@opensuse.org