LinuxQuestions.org
Help answer threads with 0 replies.
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 02-08-2018, 03:46 PM   #1
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Rep: Reputation: 88
Question Command to perform Full and Differential backups


Hey Guys,

I have searched the net and found a few ideas/solutions to perform full backups using the TAR utility. I would like to perform a weekly full backup (Saturdays) and daily differential backups (Su-Fri) for a folder located on a Ubuntu server.

So far I have tried:

Code:
tar puvf /mnt/backup/test.tar /foldertobackup
but this duplicates the folders on the tar file

I also tried:

Code:
tar Gpcvf /mnt/backup/test.tar /foldertobackup/
and it seems to create a new one tar

Server: Ubuntu Server 16.04

Thank you
 
Old 02-08-2018, 05:41 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,676

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
tar can be used to create an incremental backup using the --listed-incremental option. If the snapshot file does not exist or if you use the --level=0 option then a full backup (level 0) is performed otherwise it is a level 1 backup.

Code:
tar --listed-incremental=snapshot.file -cvzf backup.tar.gz /path/to/dir
https://www.gnu.org/software/tar/man...tal-Dumps.html

Always verify your backups...

Last edited by michaelk; 02-08-2018 at 05:42 PM.
 
Old 02-09-2018, 08:02 AM   #3
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
Thank you. I will read the documentation on the link below, test and verify my backups.
 
Old 02-09-2018, 12:53 PM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,478

Rep: Reputation: Disabled
You will likely be better served to use rsync, take a look at it's man page - it is what most back up programs use.

Also, look into cron to do the work for you.

Last edited by fatmac; 02-09-2018 at 12:54 PM.
 
Old 02-09-2018, 02:23 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,723

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
+1 for rsync -- and rsnapshot to control and manage it with minimum effort.
 
Old 02-13-2018, 09:11 AM   #6
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
Thank you guys for your responses! After testing different scenarios I will use Rsync for incremental backups and tar for weekly full backups. Thank you so much!
 
  


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
incremental and differential backups badkuk Linux - General 1 07-26-2010 03:46 AM
Differential and incremental backups mikieboy Linux - General 14 07-06-2008 09:27 PM
Theory behind full, differential and incremental backups? mohammednv Linux - Server 5 06-15-2008 08:29 AM
Creating Differential Backups with Tar FeX_05 Linux - Newbie 1 04-29-2008 03:55 AM
incremental & differential backups to CD? SheldonPlankton Linux - General 0 06-30-2004 05:33 PM

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

All times are GMT -5. The time now is 09:52 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
Open Source Consulting | Domain Registration