Difference between revisions of "Talk:Full system backup with rsync"

From ArchWiki
Jump to: navigation, search
(Comments: preserving permissions)
(Errors: Close fix error.)
(13 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Suggestions ==
+
===<s> Restore title</s> ===
 
+
Page title does not use [[ArchWiki_Tutorial_(English)#Adding_a_new_page|naming guidelines]].  Also, a forward slash between two words defines an either/or option (e.g. Backup for full/partial configurations) which I don't think is meant to be the case here.
+
 
+
--[[User:Gen2ly|Gen2ly]] 06:16, 12 December 2009 (EST)
+
 
+
:The slash was supposed to be a subpage. It looks like that's disabled in this wiki for article namespace (as it is in Wikipedia) so I'll just change it. [[User:Time|Time]] 07:05, 12 December 2009 (EST)
+
 
+
:''Full System Backup with rsync''? If not, go ahead and change it. [[User:Time|Time]] 07:14, 12 December 2009 (EST)
+
 
+
:: Just got a chance to read the article, nice work.
+
:: --[[User:Gen2ly|Gen2ly]] 14:32, 13 December 2009 (EST)
+
 
+
 
+
Thanks [[User:Time]] for taking the time to rewrite this :) It looks good and it's more generic now, also thanks for keeping the link to the original forum post.
+
 
+
* I vote for moving this page back to its initial title (Full system backup with rsync) since it can't be merged with [[Rsync]].
+
 
+
[[User:Wooptoo|Wooptoo]] 13:26, 23 December 2009 (EST)
+
 
+
===Restore title===
+
 
I cannot move it back to the same title without admin intervention. They have to delete the redirect first. Sorry for changing the name in the first place; I didn't realize subsections worked only for user pages. [[User:Pwd|pwd]] 13:27, 23 December 2009 (EST)
 
I cannot move it back to the same title without admin intervention. They have to delete the redirect first. Sorry for changing the name in the first place; I didn't realize subsections worked only for user pages. [[User:Pwd|pwd]] 13:27, 23 December 2009 (EST)
 
:Oops! Sorry; didn't realize that was the cause of the hold-up. I've removed the redirect. -- [[User:Pointone|pointone]] 13:34, 23 December 2009 (EST)
 
:Oops! Sorry; didn't realize that was the cause of the hold-up. I've removed the redirect. -- [[User:Pointone|pointone]] 13:34, 23 December 2009 (EST)
Line 27: Line 7:
 
== Comments ==
 
== Comments ==
  
Thanks! Neat method for a sync-type backup! The only question I have is what happens if you {{Codeline|dd}} the boot sector (first 512 bytes) instead of running GRUB? --[[User:VitaminJ|VitaminJ]] 22:18, 11 November 2009 (EST)
+
Thanks! Neat method for a sync-type backup! The only question I have is what happens if you {{Ic|dd}} the boot sector (first 512 bytes) instead of running GRUB? --[[User:VitaminJ|VitaminJ]] 22:18, 11 November 2009 (EST)
  
 
----  
 
----  
Line 44: Line 24:
  
 
:The only issue would be doing it with FAT or NTFS were permissions just aren't possible. Coincidentially, I've done this exact setup using XFS and ext4 wihout anything breaking down. I only had problems between reiserfs and *, but that was due to SELinux context. [[User:Dres|Dres]] 21:22, 18 January 2010 (EST)
 
:The only issue would be doing it with FAT or NTFS were permissions just aren't possible. Coincidentially, I've done this exact setup using XFS and ext4 wihout anything breaking down. I only had problems between reiserfs and *, but that was due to SELinux context. [[User:Dres|Dres]] 21:22, 18 January 2010 (EST)
 +
 +
----
 +
I think its a good idea to mention dirvish here. --[[User:Moere|Moere]] 03:37, 1 March 2010 (EST)
 +
 +
----
 +
on the same topic, you can also look at a free script that i wrote to backup the whole disk with rsync here: http://blog.pointsoftware.ch/index.php/howto-local-and-remote-snapshot-backup-using-rsync-with-hard-links/
 +
 +
It uses file deduplication thanks to hard-links, uses also MD5 integrity signature, 'chattr' protection, filter rules, disk quota, retention policy with exponential distribution (backups rotation while saving more recent backups than older).
 +
It was already used in Disaster Recovery Plans for banking companies, in order to replicate datacenters, using only little network bandwidth  and transport encryption tunnel.
 +
 +
Can be used locally on each servers or via network on a central remote backup server.
 +
windows server could also be backuped by using a linux box that mount smb shares from them.
 +
 +
i hope it will be useful to you guys
 +
--[[User:Scheuref|Scheuref]] ([[User talk:Scheuref|talk]]) 14:03, 19 September 2012 (UTC)
 +
 +
== <s> Errors </s> ==
 +
 +
I'm getting the following error with this script, unless I use --delete-excluded, although that was declared unnecessary:
 +
cannot delete non-empty directory: lib
 +
could not make way for new symlink: lib
 +
cannot delete non-empty directory: lib64
 +
could not make way for new symlink: lib64
 +
--[[User:Malstrond|Malstrond]] ([[User talk:Malstrond|talk]]) 00:31, 8 September 2012 (UTC)
 +
 +
:Rsync doesn't delete... You must have modified the script? --[[User:DSpider|DSpider]] ([[User talk:DSpider|talk]]) 06:10, 8 September 2012 (UTC)
 +
 +
::I had the same problem, turned out that I had forgotten that the script needs to be called with a destination argument. It doesn't check for this situation and will use an empty $1, which causes it to be ignored and it'll try make a backup to your root directory.. very scary!  I've now added a check to the script to prevent accidental misuse. [[User:Timusan|Timusan]] ([[User talk:Timusan|talk]])
 +
 +
== What about hard links and delete options ==
 +
 +
Why the -H option is not added?
 +
I've done a quick search in my arch system and there are a lot of hard link in the /usr/share folders.
 +
Moreover should the -delet option be added to in order to be sure that the cloned system contains all and only the files which are present in the original one?
 +
Thank you,
 +
Xwang

Revision as of 07:29, 29 December 2012

Restore title

I cannot move it back to the same title without admin intervention. They have to delete the redirect first. Sorry for changing the name in the first place; I didn't realize subsections worked only for user pages. pwd 13:27, 23 December 2009 (EST)

Oops! Sorry; didn't realize that was the cause of the hold-up. I've removed the redirect. -- pointone 13:34, 23 December 2009 (EST)
Moved the page even though I don't like the title. I really don't think the naming scheme suits it; should be Full system backup with rsync, in my opinion. pwd 14:10, 23 December 2009 (EST)

Comments

Thanks! Neat method for a sync-type backup! The only question I have is what happens if you dd the boot sector (first 512 bytes) instead of running GRUB? --VitaminJ 22:18, 11 November 2009 (EST)


I don't know if it works with dd, since the partitioning scheme can be different on the two harddrives.

  • I vote for merging this with rsync.
  • I second the vote.

Wooptoo 07:14, 2 December 2009 (EST) --Keiichi 20:59, 2 December 2009 (EST)


Yep, I think you are right, I think that GRUB hardcodes the path to menu.lst in the GRUB boot program, so if you change around disks it won't work.

As an alternative, an article on using tar instead might be useful because rsync may improperly preserves permissions across filesystems. For example if you backup from ext3 to XFS, and try to restore back to ext3.

The only issue would be doing it with FAT or NTFS were permissions just aren't possible. Coincidentially, I've done this exact setup using XFS and ext4 wihout anything breaking down. I only had problems between reiserfs and *, but that was due to SELinux context. Dres 21:22, 18 January 2010 (EST)

I think its a good idea to mention dirvish here. --Moere 03:37, 1 March 2010 (EST)


on the same topic, you can also look at a free script that i wrote to backup the whole disk with rsync here: http://blog.pointsoftware.ch/index.php/howto-local-and-remote-snapshot-backup-using-rsync-with-hard-links/

It uses file deduplication thanks to hard-links, uses also MD5 integrity signature, 'chattr' protection, filter rules, disk quota, retention policy with exponential distribution (backups rotation while saving more recent backups than older). It was already used in Disaster Recovery Plans for banking companies, in order to replicate datacenters, using only little network bandwidth and transport encryption tunnel.

Can be used locally on each servers or via network on a central remote backup server. windows server could also be backuped by using a linux box that mount smb shares from them.

i hope it will be useful to you guys --Scheuref (talk) 14:03, 19 September 2012 (UTC)

Errors

I'm getting the following error with this script, unless I use --delete-excluded, although that was declared unnecessary:

cannot delete non-empty directory: lib
could not make way for new symlink: lib
cannot delete non-empty directory: lib64
could not make way for new symlink: lib64

--Malstrond (talk) 00:31, 8 September 2012 (UTC)

Rsync doesn't delete... You must have modified the script? --DSpider (talk) 06:10, 8 September 2012 (UTC)
I had the same problem, turned out that I had forgotten that the script needs to be called with a destination argument. It doesn't check for this situation and will use an empty $1, which causes it to be ignored and it'll try make a backup to your root directory.. very scary! I've now added a check to the script to prevent accidental misuse. Timusan (talk)

What about hard links and delete options

Why the -H option is not added? I've done a quick search in my arch system and there are a lot of hard link in the /usr/share folders. Moreover should the -delet option be added to in order to be sure that the cloned system contains all and only the files which are present in the original one? Thank you, Xwang