LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2015, 03:42 PM   #1
adumith
Member
 
Registered: Feb 2013
Posts: 46

Rep: Reputation: Disabled
Making a backup and send it to another server.


Hello everyone;

Im makign a cron job wich this
Code:
rsync -ravz files_to_backup user@IP:folder_target
; but Im not sure if this script is a good way.

I wonder to know wich one is your opinion about this.

Best regards;

ADumith
 
Old 06-17-2015, 03:59 PM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,407

Rep: Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863
That's pretty much what I used to use for remote backups, so you're on the right track.
 
Old 06-17-2015, 04:06 PM   #3
adumith
Member
 
Registered: Feb 2013
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
That's pretty much what I used to use for remote backups, so you're on the right track.
Thanks a lot for your reply TenTenths; but I have a doubt how I can specify when I have several objects and folders?

Thanks again.
 
Old 06-17-2015, 04:13 PM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,407

Rep: Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863
I'd write a simple bash script to do it then if you've multiple items, then you can run the script and it'll do your rsyncs in order. Then run your script as the cron job.
 
Old 06-17-2015, 04:16 PM   #5
adumith
Member
 
Registered: Feb 2013
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
I'd write a simple bash script to do it then if you've multiple items, then you can run the script and it'll do your rsyncs in order. Then run your script as the cron job.
Could you share this sript with me?
 
Old 06-17-2015, 04:23 PM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,407

Rep: Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863
Code:
#!/bin/bash

/usr/bin/rsync -ravz files_to_backup user@IP:folder_target
/usr/bin/rsync -ravz files_to_backup_2 user@IP:folder_target_2
etc. etc. etc. Obviously replace /usr/bin/rsync with the full path to rsync for your distro.
 
Old 06-17-2015, 04:37 PM   #7
adumith
Member
 
Registered: Feb 2013
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Code:
#!/bin/bash

/usr/bin/rsync -ravz files_to_backup user@IP:folder_target
/usr/bin/rsync -ravz files_to_backup_2 user@IP:folder_target_2
etc. etc. etc. Obviously replace /usr/bin/rsync with the full path to rsync for your distro.
Ok, I got it!

Thanks a lot for you reply.

One more question: This script work for incremental backup or just replace the old one files?

Thanks again...
 
Old 06-17-2015, 04:43 PM   #8
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,407

Rep: Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863Reputation: 863
Just replaces
 
Old 06-17-2015, 05:22 PM   #9
adumith
Member
 
Registered: Feb 2013
Posts: 46

Original Poster
Rep: Reputation: Disabled
Great, thanks a lot for your help.

Have a nice day.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a DB Backup and send it to another server adumith Linux - Newbie 2 03-03-2015 04:31 PM
making a Multi tape backup wish to send email zimbot Linux - General 2 05-27-2011 11:11 AM
Making a backup e-mail server - need help with re-delivery britsky Linux - General 1 04-25-2006 11:55 AM
making java applets send packets videoediting Programming 4 05-03-2005 01:48 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration