4 methods to backup remote files across a network

Linux

On linux there are several methods to backup remote files across a network.

Method 1: SCP (Secure Copy)

SCP is basically RCP with password support. This method is good for copying files or directories recursively so long as you do not need to use an include or exclude list. As far as I can tell SCP does not have support for exclude list. Still, the syntax is very easy to remeber making scp an easy way to securely copy files across a network.

the syntax to copy a single file is: scp user@host:sourcefile user@host:target
If you are copying to or from the local machine you can omit user@host

scp bob@bobland.com:/www/index.html /home/bob/website_backup

Pretty simple right, and the syntax is the same regardless of wether you are copying local to remote, remote to remote, remote to local, etc.

To recursively copy an entire directory just add the -r (recursive) option

scp -r bob@bobland.com:/www /home/bob/website_backup

Now Bob has his whole website backed up -- sweet.

This works great and is easy to remember, but this method will copy every file evey time it is run which is slow if bob has already made a backup in the past.
Also, since you can't exclude directories this method does not work very well for making system backups where you wouldn't want to back up certain directories like /tmp or cache files.

 

Method 2: RSYNC (Remote Sync)

Rsync is the fastest method by far if you have copied the files previously, because it will only copy files that are new or have changed.
Rsync allows exclude list using the same format as tar, so it is much better for making system backups. The syntax for rsync is also pretty easy to remember.

rsync -e ssh -av bob@bobland.com:www /home/bob/website_backup

This would run super fast since Bob already has all the files, and after Bob makes changes only those changes will get copied.
Notice that Bob used a few options.
-e, --rsh=COMMAND           specify the remote shell to use
-a, --archive               archive mode; same as -rlptgoD (no -H, -A)
-v, --verbose               increase verbosity

If Bob doesn't want to include his testing directory he could do

rsync -e ssh -av bob@bobland.com:www --exclude="www/testing" /home/bob/website_backup
To exclude more dirs just add another exclude option --exclude="var" --exclude="tmp"

This method works very well for making backups and is fast, but this isn't a good archive method. If Bob changes his files and runs rsync again, his backup would be overwritten and he would not have any of the files in their previous state.

Rsync has the abbility to make incremental backups using --backup and either --suffix or --backup-dir. I like using the backup-dir method which puts all of the changes in a seperate folder. If Bob were to run the following:

rsync -e ssh -av bob@bobland.com:www --exclude="www/testing" /home/bob/website_backup --backup --packup-dir="../website_backup_01"

Then the dir /home/bob would conatain 2 folders, website_backup and website_backup_01 and only what has changed would be saved in the later directory.

Method 3: Tar

Tar is one of my favorites. Mostly because I have restored from tar backups so many times that "In tar I trust". Tar handles recursion and symbolic links better than any other method. Tar can also compress on the fly and unlike duplicating files and directories, tar saves the file structure to a single file. Tar has a pretty simple syntax for doing simple stuff, but gets complex when used via ssh to tar files across a network.

 

Almost done, just need to give some simple and complex tar examples. and sshfs examples

but here is a quick peek on how to tar across a network. This is how I back up my iphone when I want to make a complete tar archive.

ssh root@192.168.1.105 "tar cvpfz - / --exclude="tmpl" | ssh regx@192.168.1.102 "cat > /media/shared/backup/iphone/iphone_bak_$today.tgz"

Basically you just set the output on onside to - and pick it up on the other end via ssh

 


Comments
(Thanks to everyone who comments)

This is really good

This is really good information I have visited this blog to read something fresh and I really admire you efforts in doing so 192.168.1.1 192.168.1.1 192.168.1.1 192.168.1.1


UP Board 10th Result 2017

UP Board Intermediate Result 2017 will be available online for Commerce, Science, Arts Streamwise Result. Check Out the UP 10th Result 2017 for Board Examination.


Amazing work

The all the four methods are really helpful and I am sure this method I cannot found any other sites of the internet. This program supports the password and has the backup behind and if we forget the password or delete the files this software recover soon. You can visit this http://www.aussiessay.net/ website to get quality task from us.


kerala sslc results 2017

check cashing spring-valley

Good blog site in addition to I adore what exactly you should claim in addition to I'm sure I most certainly will twitter that available to help the good friends so as to give it a look likewise. I'm keen on what exactly you should claim good document. At this point abide by in this article check cashing spring-valley Hold blogs the favorable material.


Amazing work

This is probably the best, most concise step by step guide I have never seen before. Every feature of this site very interesting and very intellectual. This site inspires us and I think the main reason is that this site working really hard. Student can meet with our most talented essay writer who are able to write your work as your own desire.


Your site is very amazing

Your site is very amazing and informative. You select every time very different title which is much interesting and very useful. Like in this post, Sharon organized a workshop which is good and informative for me. Keep it up. Well done and keep up with http://www.researchpaperservicesreviews.com/freshessays-com-review/ website to get informative knowledge about thesis task.


Education

trigonometric ratios in right triangles.trigonometric ratios of associated angles.trigonometric ratios of complementary angles.
trigonometric ratios and identities.trigonometric ratios of compound angles.trigonometric ratios of angles.trigonometric ratios of acute angles.trigonometric ratios of allied angles.trigonometric ratios.trigonometric ratios and special angles.trigonometric ratios of any angle .trigonometric ratios class 10.trigonometric ratios class 11.exact trigonometric ratios.exact trigonometric ratios.trigonometric ratios grade 12.trigonometric ratios of special angles.trigonometric ratios of obtuse angles.primary trigonometric ratios.six trigonometric ratios.trigonometric ratios trick.introduction to trigonometric ratios.the trigonometric ratios.values of trigonometric ratios.trigonometric ratios working model.

. Trigonometric ratios. Sine Rule. Cos Rule. Tan Rule. Hypotenuse. Base. Perpendicular. Right angled triangle.Square of hypotenuse is equal to the square of base plus square of perpendicular.
href="https://www.youtube.com/watch?v=U6YLXNwSlRI">trigonometry


I'm Joker

Thanks for sharing! I enjoyed this article. Urge you to continue to write articles like this. I would like to introduce myself:
I'm admin at:
friv 5 |
friv 10 play |
friv4school |
slitherio kizi |
yoob |
Click to link and play free 10000 games online: - Girl game - frozen game - io game - racing game - shoot game - puzzle game - action game ....


jac 10th class results 2017

Looks Great

We are looking great with them.
www.reviewprotocol.com/language-of-desire/


Read More

Across a network will get free of charge.
Learn More Information


4 methods

hallo
thx for this interesting article.
Am i bl


I exploit solely premium

I exploit solely premium quality products -- you will observe these individuals on: งานพาร์ทไทม์


Awesome

Your 4 methods to backup remote files across a network are awesome. It seem to me that everyone likes this post. As for me I think I should share it on my blog http://professionalessayuk.com/paperhelp-org-reviews/, My readers are interest in the data like this.


I think this is an okay

I think this is an okay article. You make this data intriguing and locks in. You give perusers a considerable measure to consider and I value that sort of composing. best biometric door lock review


Its an extraordinary delight

Its an extraordinary delight perusing your post.Its loaded with data I am searching for and I want to post a remark that "The substance of your post is marvelous" Great work. procustomwriting Much obliged, that was a truly cool read!


Robinjack

Respecting the time and exertion you put into your online journal and point by point data you offer!.. http://bbgworkoutbikinibodyguide.snappages.com/


Robinjack

It turned out to be Very useful to me and I am certain to every one of the observers here! personal injury lawyer West Palm Beach


Errors fixed. fixed dns

Great

Oh, this is great article. I was searching for paper help reviews but I am glad that I found this post.


Thanks

Thanks and must checkout about snaptubeapk2016 at snaptube download app here.


Roads

Look right and left while crossing the road.
Click Even More


Really great post. I just

Really great post. I just unearthed your online journal and needed to say that I have truly delighted in perusing your blog entries. Any way I'll be subscribing to your food and I trust you post again soon. Huge much obliged for the valuable data. iphone 6 plus/6s plus wallet cases


jackman10

I have perused your article, it is exceptionally instructive and supportive for me.I appreciate the profitable data you offer in your articles. A debt of gratitude is in order for posting it.. Halloween Costumes Canada


Halloween Party

If you want to come in the Halloween party so you have to wear Halloween costumes.
Read More


jackman10

Howdy! A debt of gratitude is in order for the considerable data you havr gave! You have touched on crucuial focuses! baby shower gift baskets


Yudhaa

Saat ini sudah semakin banyak pembangunan perumahan, dan rumah yang sehat tentu perlu septic tank sebagai sanitasinya, namun masih banyak yang belum paham tentang IPAL yang sehat. septic tank yang bagus punya media pengolahan seperti Septic Tank Bio yang bisa ada lihat Jual Septic Tank yang murah dan terjangkau serta ramah lingkungan. Anda juga bisa menggunakan Toilet Portable untuk proyek yang dilaksanakan sementara dan dalam tempo yang singkat.


Thanks for share an

Thanks for share an informative post .
Get your ex love back


Thanks so much for the

Thanks so much for the post.Really looking forward to read more. Want more...
list of engineering colleges in jaipur


Thanks so much for the

Thanks so much for the post.Really looking forward to read more. Want more...
list of engineering colleges in jaipur


Everyone have to go at work

Everyone have to go at work and some other places regarding any matter. So it is difficult to move with all the data due to some personal problems and due to some circumstance it become more important to backup data from remote area. Your guidelines are pretty helpful in this regard and our superior paper is also an impressive help out for students to get good grades.


The progress and development

The progress and development of a country depends upon the experienced and educated population of the country. They have better knowledge and information about making success in the country. Our essay writers know well that how they can develop an outstanding writing for you.


Post new comment

More information about formatting options