[opensuse] other backup strategy with rsync
Hello, I need some hints around the rsync use. I'm very concerned by backup/archives. I already have viable archive system for important data (redundant) and clonezilla o my main disk. But all this needs manual work, and takes some time (max one hour), where the computer is either offline or not really usable. So it's done randomly at too long intervals in my feeling. I also have a very cheap unused online server with 2Tb data, to be related with the 500Gb size of my main disk. So I want to use this server as backup. For example an hourly backup, somewhat incremental, where I could find a copy of whatever file I may have deleted since the last real backup/archive. what may be the rsync syntax to a cron job to backup root and /home like this? rsync or any other simple tool. date can be limited to, say, three month in the past, and all what is older removed if no more present thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello,
I need some hints around the rsync use.
I'm very concerned by backup/archives. I already have viable archive system for important data (redundant) and clonezilla o my main disk.
But all this needs manual work, and takes some time (max one hour), where the computer is either offline or not really usable. So it's done randomly at too long intervals in my feeling.
I also have a very cheap unused online server with 2Tb data, to be related with the 500Gb size of my main disk.
So I want to use this server as backup. For example an hourly backup, somewhat incremental, where I could find a copy of whatever file I may have deleted since the last real backup/archive.
what may be the rsync syntax to a cron job to backup root and /home like this? rsync or any other simple tool. date can be limited to, say, three month in the past, and all what is older removed if no more present
thanks jdd easiest is to create an ssh connection based on key pairs from that server to your machine. Next, invoke rsync like this: rsync -avz youruser@yourmachines-IP:/ That would create a backup of everything. I would leave the deleting of files
Op vrijdag 11 mei 2018 14:16:20 CEST schreef jdd@dodin.org: older than three months up to a separate script. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 11/05/2018 à 14:37, Knurpht @ openSUSE a écrit :
easiest is to create an ssh connection based on key pairs from that server to your machine.
sure :-) Next, invoke rsync like this:
rsync -avz youruser@yourmachines-IP:/ That would create a backup of everything. I would leave the deleting of files older than three months up to a separate script.
easy to try thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd@dodin.org wrote:
Hello,
I need some hints around the rsync use.
....
what may be the rsync syntax to a cron job to backup root and /home like this? rsync or any other simple tool. date can be limited to, say, three month in the past, and all what is older removed if no more present
Depends what/how you want it. We use a script that makes use of --link-dest, to use hard links in the backup. It basically does a full rsync backup once, and then creates new backups in separate directories (named by date) that contain the full backup, but only changed files (relative to the previous backup) actually consume space on the disk. The call would be something like rsync -avpogt --link-dest=/backup/<Last_Backup> /save/this/dir/ /backup/<New_Backup> Then you need some scripting around this to find the lates previous backup and to remove older ones. We do backups (only) on daily basis, so dirnames are just the date. If you want to run it more often that should also include the hour. Drawback is that you cannot easily see what has changed (other than running diff -qr on the directories). But you have a full tree available, similar to what btrfs snapshots / snapper give. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 11/05/2018 à 15:11, Peter Suetterlin a écrit :
Drawback is that you cannot easily see what has changed (other than running diff -qr on the directories). But you have a full tree available, similar to what btrfs snapshots / snapper give.
it seems pretty near what I want, thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Freitag, 11. Mai 2018, 14:16:20 CEST schrieb jdd@dodin.org:
[...] I also have a very cheap unused online server with 2Tb data, to be related with the 500Gb size of my main disk.
So, do you have ssh access and are you able to install packages there?
So I want to use this server as backup. For example an hourly backup, somewhat incremental, where I could find a copy of whatever file I may have deleted since the last real backup/archive.
I'm using storeBackup and maintaining its openSUSE package: https://software.opensuse.org/package/storeBackup It's a disk-to-disk backup tool. It creates a new directory for each backup that includes all previous unchanged files by using hard links and, thus, saving space (deduplication) : http://www.nongnu.org/storebackup/en/node16.html rsnapshot does the same but cannot split very big files (like VMs) into small blocks so that there will be no deduplication. Furthermore, storeBackup can move the actual work of creating hard links to the remote server if there is storeBackup installed, too. This speeds ups backups by a factor of 10 to 75 when using sshfs: http://www.nongnu.org/storebackup/en/node85.html#myfaqSSH
what may be the rsync syntax to a cron job to backup root and /home like this? rsync or any other simple tool. date can be limited to, say, three month in the past, and all what is older removed if no more present
storeBackup supports sophisticated deletion strategies, especially if you do backups on a irregular basis: http://www.nongnu.org/storebackup/en/node50.html Gruß Jan -- You can't hold a man down without staying down with him. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 11/05/2018 à 17:05, Jan Ritzerfeld a écrit :
Am Freitag, 11. Mai 2018, 14:16:20 CEST schrieb jdd@dodin.org:
[...] I also have a very cheap unused online server with 2Tb data, to be related with the 500Gb size of my main disk.
So, do you have ssh access and are you able to install packages there?
sure, openSUSE 42.3 on both sides
I'm using storeBackup and maintaining its openSUSE package: https://software.opensuse.org/package/storeBackup
great, of course I can install it on both parts I will study this, thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Jan Ritzerfeld
-
jdd@dodin.org
-
Knurpht @ openSUSE
-
Peter Suetterlin