View previous topic :: View next topic |
Author |
Message |
loopx Advocate
Joined: 01 Apr 2005 Posts: 2787 Location: Belgium / Liège
|
Posted: Sat Apr 14, 2012 7:51 pm Post subject: [Full backup] to a Synology NAS ? (solved) |
|
|
Hello,
I'm planning to make new backup for my server (OS, data, ...). And since I've got now a NAS, it should be very interesting to use it as backup storage.
So, how can I do it ... any idea ... ? What about a rsync of the whole "/" tree ??? I also thought to create TAR file ... and use netcat (nc) to avoid disk usage for creation on the local server ... but with Synology, no netcat at all by default and so, not a good idea ...
Seriously, does rsync could do the trick ? What will happen ???
Thanks _________________ Mon MediaWiki perso : http://pix-mania.dyndns.org
Last edited by loopx on Tue May 29, 2012 7:01 pm; edited 1 time in total |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Sat Apr 14, 2012 9:06 pm Post subject: |
|
|
a NAS implies some kind of network share protocol (usually smb/cifs, maybe also nfs). And as you usually (at least in my experience) do not have proper access to the underlying FS, I would use tar for storing that backup data.
assuming you want to keep it simple, have only /boot, / and /home as separate partitions, and want to use one single tarball for backup. you backup share is mounted in /mnt/backup
Code: | tar czf /mnt/backup/backupfile.tar.gz --one-file-system / /boot /home |
V. _________________ read the portage output!
If my answer is too concise, ask for an explanation. |
|
Back to top |
|
|
loopx Advocate
Joined: 01 Apr 2005 Posts: 2787 Location: Belgium / Liège
|
Posted: Tue May 29, 2012 7:00 pm Post subject: |
|
|
Hi (sorry for the delay),
Thanks for your reply. I've made some search and learned how VMware Converter tool is working and now, I got a good way to do backup.
First, you should add "--sparse" as argument for "tar" command, this is to avoid to backup a whole empty file.
Second, use SSH and STDOUT to transmit the archive.
So, here is my command to run on the host to backup (only for "/") (to adapt to your use) :
Code: | tar --one-file-system --sparse -C / -cf - . | ssh -c blowfish root@syno "cd /volume1/backup/host && gzip -f > server.tar.gz" |
This example is working fine with a Synology NAS as backend storage. Data is packaged into TAR file, transmitted over the network and then, is compacted on the NAS. You can remove "gzip -f" and use "cat" to avoid compression on NAS side. You can also add "z" flag to the "TAR" command on the host side : it's very flexible.
I'm very happy with that and VMware is happy too
Thanks _________________ Mon MediaWiki perso : http://pix-mania.dyndns.org |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|