You are Here:
Download Linux Lite 5.4 Final today - See Release Announcements



X Close Ad
X Close Ad
Tutorial - using 'rsync': a terminal method for backing-up

Author (Read 3881 times)

0 Members and 1 Guest are viewing this topic.

Tutorial - using 'rsync': a terminal method for backing-up
« on: September 26, 2017, 06:48:30 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 891
    Posts
  • Country: gb
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 4.6 64bit

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
Understandably, we're all a bit concerned about the announcement that systemback, that wonderfully user-friendly back-up tool, will no longer be supported in future - a great shame. Unfortunately, I don't have the skills and know-how to help in that area for it's continuation (not in a million years!)  :'(

So, like you, I'm wondering what to use in the future instead of systemback, though I'm sure Jerry will come up with something.  In light of this, I heard about a tool called rsync in the Manjaro forum, and I use it on setups3&4 (in signature). Rsync is a terminal-based tool (it seems to back up much faster than the GUI-based dejadup): the good news is that it's installed by default in LL3.6  ;)

There is a GUI-based version of rsync called grsync, also available to install from the Ubuntu repository (see Install Updates in LL menu).
Just a thought for the LL developers:  could grsync replace systemback in future LL upgrades, with explanatory notes on its use incorporated into the LL Help Manual ?

Without guidance notes on how to use grsync, I therefore found the terminal-based rsync easier to use, after I got some help on the Manjaro forum community, and would like to share this with you guys.

To use rsync, you need to do the following:

1. Create a back-up folder, e.g. let's call it Backup, and we'll put it at home/mike/                   
    [substitute 'mike' for your user name; the the name of the back-up folder & where you put it is entirely your choice]

2. Now when  backing-up, certain exclusions will be made: you don't want to include everything, otherwise the back-up file will be cumbersome
    [e.g. it's assumed that your directories (Documents, Downloads, Pictures, etc) will be backed-up elsewhere such as to an external drive]

To back-up, open terminal and copy & paste this:
Code: [Select]
sudo rsync -aAXv  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /home/mike/Backup/
My first rsync backup, took up around 9.2GB, compared to 7.6GB for deja-dup. Future backups just add anything new since the last backup, so are quicker to complete.

To restore from the folder Backup, created at /home/mike/ , copy & paste this:
Code: [Select]
sudo rsync -aAXv  --delete={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /home/mike/Backup/
I'll be quite honest that a significant amount of the  command-line I use is often beyond my comprehension. My motto is: "if it works, use it", and along the way I find my understanding grows a little bit more over time.  I know the terminal doesn't suit everyone, but for those who are happy to use it, then I hope this is useful.

Mike

PS. Please let me know if I've made any typos in the command-line & I'll go back and correct these.
Last Edit: September 29, 2017, 06:29:24 AM by m654321
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 


 

X Close Ad
X Close Ad

Download Linux Lite 5.4 Final today - See Release Announcements