LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-29-2018, 02:34 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
rsync question


Hello,

I want to have hourly backup of directory using rsync.

Incremental backup should copy only new or modified files only. How this can be achieved with rsync without --link-dest option ?

I have the script but it uses --link-dest option.
 
Old 10-29-2018, 02:41 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Code:
rsync -a
will do incremental backups. See man rsync

I also include the --delete option to remove files in the backup that have been deleted in the source.

Check out rsnapshot for a utility to manage rsync backups.
 
Old 10-29-2018, 02:43 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,306
Blog Entries: 3

Rep: Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720
In addition to -a, you might also need -H if you have hardlinks to deal with in your hierarchy of source directories. Again, see "man rsync"
 
1 members found this post helpful.
Old 10-29-2018, 02:45 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I do not really understand why do you want to avoid --link-dest.
https://serverfault.com/questions/13...mental-backups
did you check different solutions on the net already? Did you find something interesting?
 
Old 10-30-2018, 12:35 AM   #5
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
sigint-ninja, use --compare-dest instead of --link-dest.

pan64, this might be useful if the destination filesystem does not support hardlinks, in which case --link-dest is ignored.
 
Old 10-30-2018, 05:32 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by Beryllos View Post
pan64, this might be useful if the destination filesystem does not support hardlinks, in which case --link-dest is ignored.
Please do not answer instead of the OP. Probably you are right, but I would like to know the real original reason.
 
Old 10-30-2018, 08:56 AM   #7
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Yes, I too would like to know why the OP needs this, and I do not assume his reason is the same as the one I suggested.
 
  


Reply



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
rsync with --link-dest: Question about interrupted rsync session bvz Linux - Server 9 09-10-2016 11:31 AM
a few question about rsync methodtwo Linux - Newbie 1 05-20-2011 01:38 PM
rsync question hawk__0 Linux - Software 2 10-02-2009 01:25 PM
rsync question mokku Linux - Newbie 1 05-31-2008 08:56 AM
Another Rsync question phatboyz Linux - Networking 2 07-02-2004 08:46 AM

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

All times are GMT -5. The time now is 03:38 PM.

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
Open Source Consulting | Domain Registration