Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Backing up Linux


  • Please log in to reply
9 replies to this topic

#1 Al1000

Al1000

  • Global Moderator
  • 8,109 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:04:02 PM

Posted 27 October 2015 - 10:20 AM

If you back up Linux, what do you use?

I recently started using rsync to back up my user's home directory. One command
rsync -av --delete /path/to/directory/to/be/copied/ /path/to/destination/directory
which in my case (using Puppy) is:
rsync -av --delete /mnt/sda7/home/al/ /mnt/sdb2/kubuntu_home_backup
...backs up my /home/al/ directory to a directory called kubuntu_home_backup on another partition. Note the absence of a forward slash at the end of the destination directory. If I typed /mnt/sdb2/kubuntu_home_backup/ instead of /mnt/sdb2/kubuntu_home_backup, then the terminal would create another directory at /mnt/sdb2/kubuntu_home_backup/al, and back up everything in there.

The first time the command is run, it makes a copy of my /home/al directory. After that, when I run the command, it only copies files that have changed, and also deletes any files from the backup directory that I have deleted from my user's home directory since I last ran the command.

Pretty clever, huh? :)

The -a option is for archive, and -v is for verbose, as you might have guessed. The --delete option deletes files that I have deleted as I described above.

You can also use compression to make the backup smaller, although I haven't bothered with that so far.

Please see rsync --help, info rsync and man rsync for more detalis

Edited by Al1000, 27 October 2015 - 10:26 AM.


BC AdBot (Login to Remove)

 


#2 DeimosChaos

DeimosChaos

  • BC Advisor
  • 1,445 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States, Delaware
  • Local time:11:02 AM

Posted 27 October 2015 - 10:33 AM

rsync is a pretty cool tool. Haven't used it myself though. I have a server set up so if its anything important I usually just save it automatically to that. It currently has a RAID 1 (I think it was 1, may be 0) array setup. So I get a some redundancy.

 

I have looked at setting up a syncing tool for all my systems (Windows and Linux) to back up everything (that I choose) right to my server. Then if anything is out of sync (say when I load my laptop up) it downloads the newest file right from the server. Haven't done this yet though... I would need to do some cleaning up first just... to many junk files haha.


Edited by DeimosChaos, 27 October 2015 - 10:34 AM.

OS - Ubuntu 14.04/16.04 & Windows 10
Custom Desktop PC / Lenovo Y580 / Sager NP8258 / Dell XPS 13 (9350)
_____________________________________________________
Bachelor of Science in Computing Security from Drexel University
Security +


#3 pcpunk

pcpunk

  • Members
  • 6,327 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:11:02 AM

Posted 27 October 2015 - 08:32 PM

Really like this:

@Al's quote: The first time the command is run, it makes a copy of my /home/al directory. After that, when I run the command, it only copies files that have changed, and also deletes any files from the backup directory that I have deleted from my user's home directory since I last ran the command.

 

I assume this means no baby sitting like if I Select Copy Pasted? and have to Okay Overwriting.


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#4 paul88ks

paul88ks

  • Members
  • 1,331 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Dallas,Texas
  • Local time:10:02 AM

Posted 31 October 2015 - 12:35 AM

Very clever- one day i will learn to use the terminal as well as you do - maybe! Is your backup drive the same size as your Ubuntu install?


Edited by paul88ks, 31 October 2015 - 12:37 AM.


#5 buddy215

buddy215

  • Moderator
  • 13,498 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:West Tennessee
  • Local time:10:02 AM

Posted 31 October 2015 - 07:26 AM

I have no need to backup constantly. I do save a lot of stuff such as pics and important docs, receipts, etc. in online email accounts.

 

Once every month or so I do create an image that contains both Windows and Linux partitions...a complete image of the hdd that I store on an external drive.

I use DiscWizard | Seagate (their version of Acronis) for doing that. Windows 7 does use a stripped down version of Acronis but the DiscWizard allows for imaging all

partitions...not just Windows. Western Digital uses Acronis for their customized tool for imaging, too.


“Every atom in your body came from a star that exploded and the atoms in your left hand probably came from a different star than your right hand. It really is the most poetic thing I know about physics...you are all stardust.”Lawrence M. Krauss
A 1792 U.S. penny, designed in part by Thomas Jefferson and George Washington, reads “Liberty Parent of Science & Industry.”

#6 merrickdav

merrickdav

  • Members
  • 28 posts
  • OFFLINE
  •  
  • Local time:05:02 AM

Posted 12 November 2015 - 09:03 PM

This looks useful http://www.bleepingcomputer.com/forums/t/594582/backing-up-linux/ as it claims to do Unbuntu and Linux



#7 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:02 AM

Posted 13 November 2015 - 02:36 AM

Hi Al, good to see you have embraced rsync.

 

I first mentioned it September, 2014, over at cat1092's

 

http://www.bleepingcomputer.com/forums/t/549294/best-home-directory-backup-tool-for-linux-mint-ubuntu-derivatives/page-2

 

... where I said

 

 

Cat, I wonder whether

rsync

might not be of some use here. I haven't used it yet but plan to next few days. Have you used it?

man rsync

invokes an extensive manual under Terminal. I have by no means read it thoroughly, yet, but scrolling to around the "760s" in terms of lines of text brings you to a section on backup.

 

Ubuntu have what appears to be the same manual, online, here. At their page, a Ctrl-f search as "backup", non-case specific, finds 39 matches, and Match 11 brings you to the same backup reference I was viewing in Terminal.

There are no doubt other references, and more sites with the manual, I am hoping for one in PDF that I can download and view at my leisure offline.

 

One thing I found particularly attractive on first reading, was the authors' comments as below:

 

eK9iVpy.png

 

What do you (and others) think?

 

Wiz

 

At that time, NickAu thought that only sysadmins use it (typically), but it DOES in fact have application for the Home User.

 

rsync is so versatile, that a number of Linux backup utilities use it, not the least, Timeshift, as their core software.

 

Keep on truckin'

 

:wizardball: Wizard



#8 mremski

mremski

  • Members
  • 498 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NH
  • Local time:12:02 PM

Posted 13 November 2015 - 06:49 AM

Just keep in mind that the data transfer is cleartext, so there is a potential for MITM attacks.  This can be solved with the SSH options on rsync (your data is then encrypted during transfer).  It may seem silly or overkill for a home network, but practicing good security at home transfers easily to "the real world".


FreeBSD since 3.3, only time I touch Windows is to fix my wife's computer


#9 merrickdav

merrickdav

  • Members
  • 28 posts
  • OFFLINE
  •  
  • Local time:05:02 AM

Posted 13 November 2015 - 01:38 PM

 rsync sounds ok but a little bi complicated and unsecure will have a look at zTimeshift.

 

I would something that was user frindly anf idiot proof



#10 merrickdav

merrickdav

  • Members
  • 28 posts
  • OFFLINE
  •  
  • Local time:05:02 AM

Posted 13 November 2015 - 01:51 PM

Other options 

 

http://www.techrepublic.com/blog/10-things/10-outstanding-linux-backup-utilities/

 

http://www.cyberciti.biz/open-source/awesome-backup-software-for-linux-unix-osx-windows-systems/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users