LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-04-2016, 01:56 PM   #16
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Rep: Reputation: Disabled

Quote:
Originally Posted by Fixit7 View Post
I take it that they backup just the current partition.
yes, whereas the OS is in /dev/sdxY = "/" and "/home" is in /dev/sdxZ although I don't call the partition in rsync, just the directories. It is fast and the first one is written for doing incremental backups of / partition however, it needs some tweaking as mine tends to grow much larger than I expected when doing incremental backups. That script is for the initial backup of "/". The script for incremental backups to the initial backup is (assuming the backup is mounted in /mnt):
Code:
rsync -aAXhv --exclude={/dev/*,/home/*,/media/*,/mnt/*,/proc/*,/run/*,/sys/*,/tmp/*,/lost+found} --link-dest=/mnt/path/to/backup/YYYY-MM-DD /* /mnt/path/to/backup/$(date -I)
The backup will be a backup of "/" minus the stuff excluded, it will create a /home folder that will be empty. As mentioned, I rsync backup home usually first the whole enchilada, then individual directories of interest thereafter by modifying the paths from/to the correct backup directories. Rsync works over WAN and LAN too but I haven't done that (no experience or need to). These scripts if there is a file in the backup that no longer exists or has changed in any way, it will get deleted and the changed file will be written to the backup. Rsync is very good at it, a simple text file with a character or two changed in it but retaining the same file name will get deleted on the backup and replaced with the changed file. I use it a lot with home directory and excellent if VBox stuff crashes rather than running VBox snapshots, just rsync the backup vdi back to the /home/~/VirtualBox \VMs/ directory and good to go
 
Old 08-04-2016, 02:50 PM   #17
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Thanks.
 
Old 08-04-2016, 03:06 PM   #18
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Partitions(s) don't really come into it.
Linux doesn't have any concept of "current partition", unlike Windows with its C-drives etc.

You could have /etc, /var and /home on different partitions (for example) and the backup would still work.

However, the restore might be a trifle tedious!

Actually the recommendation would be to put /home on a separate partition to your OS anyway.
If you should want to install an upgraded OS over the top of your present OS, then a separate /home is virtually a pre-requisite.
 
Old 08-04-2016, 03:09 PM   #19
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by JeremyBoden View Post
Actually the recommendation would be to put /home on a separate partition to your OS anyway.
If you should want to install an upgraded OS over the top of your present OS, then a separate /home is virtually a pre-requisite.
Or you could use a reasonably fast external drive to rsync it off and back on in just a few minutes.
 
  


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
Backing a solaris 10 system kenosongo Solaris / OpenSolaris 1 04-27-2012 08:23 AM
Backing up system with two HDs Toadman Linux - General 5 09-05-2010 08:04 PM
Backing up system to DVD Skyguy Linux - Newbie 4 07-31-2007 01:04 PM
Backing up your system? alime Ubuntu 2 05-18-2005 09:06 PM
Backing up the whole system... koyi Linux - General 12 10-07-2003 06:22 AM

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

All times are GMT -5. The time now is 09:41 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