Linux - Backup your data the quick and efficient way with RSYNC

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 62

  • @AndreKochDre
    @AndreKochDre 3 ปีที่แล้ว +1

    In my opinion the best rsync video for linux beginners. Wish you had completed it by including instructions for making the command a cron job though.

  • @Laflamablanca969
    @Laflamablanca969 3 ปีที่แล้ว +1

    The trailing slash makes it sync the contents of the directory only. If you remove the slash, it syncs the parent folder AND the contents.

  • @jamesbaxter2812
    @jamesbaxter2812 4 หลายเดือนก่อน

    sir, I have ask a person om going slow this way, Ten I found you. Thanks and it worked.

  • @TrystansWorkbench
    @TrystansWorkbench 6 ปีที่แล้ว +2

    Kevin. Good job. You can also check out rsnapshot. It's a script that uses rsync but it adds the capability to go back to previous days of backups with a clever use of symbolic links. It means that you can "roll back" to an old version of a file easily (in case you accidentally make a mistake working on a file).

  • @bbolin711
    @bbolin711 6 ปีที่แล้ว +1

    rsync is an excellent tool for keeping backups. Using rsync with ssh keys and cron is even better to automate. I always suggest keeping /home as a separate filesystem in case you need to reload the OS.
    Another tip for OS (the brick) backups is using lvm snapshots or another one is Rear ( relax-and-recover.org/ )
    Using -k with man can be handy also if your not sure what your looking for
    man -k rsync
    librsync (3) - library for delta compression of streams
    rsync (1) - a fast, versatile, remote (and local) file-copying tool
    rsyncd.conf (5) - configuration file for rsync in daemon mode

  • @MoTown44240
    @MoTown44240 6 ปีที่แล้ว

    Good advice Kevin. Here's another one, for files that are duplicates but have different names, e.g. images from your phone or DSLR. For the command line fdupes -r or fdupes -rd or for CLI challenged FSlint.

  • @PoeLemic
    @PoeLemic 4 ปีที่แล้ว

    Thanks for helping to teach all of us LInux. I think that I will finally make the jump soon from WIndows to Linux. I'm tired of all the updates, problems, features that bonk out, etc. I just want stability. So, this is something that I need (Rsync) to back things up and keep it protected on a server. So, thank you for sharing what you know.

  • @mrmotofy
    @mrmotofy 3 ปีที่แล้ว

    Synkron or GRsync are pretty good easy to use GUI for Rsync if you want to just check boxes

  • @chrismyers8361
    @chrismyers8361 6 ปีที่แล้ว

    Thanks. I used RSYNC earlier today moving all my pictures and videos to my NAS. Worked like a champ!

  • @johnwmacdonald994
    @johnwmacdonald994 6 ปีที่แล้ว +3

    Always glad to meet other Linux users.

    • @PoeLemic
      @PoeLemic 4 ปีที่แล้ว

      I'm coming over -- from the Dark Side. Finally getting tired of constant updates, BSOD, etc. I want stability, and I see how Linux has that.

  • @iflnr978
    @iflnr978 5 ปีที่แล้ว

    thumbs up, exactly what i wanted to know, from my point of view, minute 4:39 " that's really complicated sounding, just trust me on this, you want to put a trailing slash on your source name" 5:52. i came to watch your video precisely because i want learn from you, why are you trying to convince me take your word for something? if i didn't trust you, i would watch someone else's video.if i think adding a slash is stupid, i'll leave it off, and good luck to me, right?
    computer networking is in many ways complex. not in every single way, but many ways, so explaining a path is ok to do, no apologies needed, no dumbing down needed and the words are not confusing. if they turn someone off, maybe they should be watching some other video.
    this is one of my pet peeves, more has to do with me than your video which is really good, thumbs up etc, thanks for taking the time to make the video and post it here, thank you. this is my honest reaction, i am not trying to be mean, it's just that if you relate to what i am saying, you might consider it in future videos, if not, no big deal, i'll still watch and enjoy, thanks

  • @NoEgg4u
    @NoEgg4u 3 ปีที่แล้ว +1

    Greetings:
    Three questions, which will help me switch from Windows to Linux, without having to worry when things go wrong:
    1a) If I edit a file every day, and I also use rsync ever day, then that will ensure that my latest version of my file is backed up.
    After several days, I realize that I screwed up the file 3 days ago. But rsync has been running every day. So I have no way to see the file, as it was, 3 days ago.
    A program that does true incremental backups will have the image of your source, exactly as the source was, each time the incremental backup had run.
    1b) Same thing for a file that got deleted, but you did not realize that it got deleted. So the --delete option now mirrors your mistaken deletion to your backup folder. Now, instead of being able to retrieve a copy of the accidentally deleted file, it is gone, because rsync made a new image each day, and did not preserve the image from each day that the backup was run.
    Does rsync have any options that will keep you backup image, as it was, each time you ran the backup?
    If not, is there a different backup program that will do this?
    2) If my computer will not boot, due to missing or corrupt files, then is it a simple matter of booting from a live USB flash drive, that will have rsync on it, and in that session I will be able to use rsync to copy files back from the backup drive to the computer's internal boot drive?
    3) I want my backup, which will be stored on an external USB drive, to be encrypted.
    I use VeraCrypt on my Windows PC, and that free, open source program is available for Linux.
    Will I be able to mount a USB based, VeraCrypt encrypted partition and have rsync use that for the destination, and also be able to do restores in a similar manner?
    Will I be able to boot from a USB flash drive that can run both VeraCrypt (to mount the external, encrypted partition) and also run rsync to restore files?
    I am currently running Windows, and I am determined to ditch Windows, in favor of a Linux distribution. But I want to be sure that I can undo the mistakes that I am sure to make with my first venture into the world of Linux.
    For Windows backups, I am using Acronis' True image. It is graphical. But it does allow you to open a bash terminal if you use its bootable media.
    The program backs up everything exactly as I described in my above questions. Every incremental stands on its own, representing that day's file versions.
    I would like the same peace of mind with a standard backup program from a Linux repository, that I can use when I soon start running Linux.
    Thank you.

    • @loughkb
      @loughkb  3 ปีที่แล้ว

      rsync is a specific tool for a specific job. If you want a full managed backup program with incremental and history, there are a few. A search on "linux backup tools" will probably find them for you.
      And yes, a veracrypt mounted volume is accessible. It gets mounted into the file tree just like any other storage device.

  • @DonDegidio
    @DonDegidio 6 ปีที่แล้ว

    Hi Kevin,
    Great time on stream earlier. Now that power came back on and boiler back up to temp it started leaking. Pressure was way up. I think when the temp dropped, it let in some water and when burner came back to life it caused the extra pressure. Bled it off and will keep an eye on it. The boiler was installed in the middle 60's. I think we have our moneys worth. :-) 73 WB3BJU

  • @Jimwill01
    @Jimwill01 6 ปีที่แล้ว +4

    I learned on a DOS machine. So the command line doesn't bother me. Of course when I first got into linux I had problems like typing "dir" instead of "ls", but now it is the other way around - I have more problems on Windows command line than I do on linux! :)

    • @bernarrcoletta7419
      @bernarrcoletta7419 6 ปีที่แล้ว

      J. Williams Do you get the slash symbols backwards too? ;)

    • @iflnr978
      @iflnr978 5 ปีที่แล้ว

      is it stable yet?

  • @samglaim4274
    @samglaim4274 6 ปีที่แล้ว +3

    Interesting stuff. I keeping dabbling with Linux, and using the terminal is one of the things that is a bit tricky (reminds me a lot of DOS commands?). Linux Mint (what I've been using) seems really friendly for people like myself who normally run Windows and most of the 'normal' stuff seems easy enough with the Linux Mint interface. Thanks for the video.

    • @md.shahinurrahman747
      @md.shahinurrahman747 ปีที่แล้ว

      Hi Sam Glaim, I've wanted to ask a question to you about the windows functionality, if you did earlier then please answere me. If want to lock a folder in windows without using any third party software installation, How should do that, the use case is, the top level folder contains few more sub-folders and those sub-folders also contains sub-folders and files, but only the top folder will be password protected. There is no encryption required. The Admin will set the password and Admin should also access to that folder using password. if you have knowledge plase I would request to you please share.

  • @andydavies27
    @andydavies27 3 ปีที่แล้ว

    Thanks - combined with a cronjob this can easily replace a prebuilt NAS

  • @johnpawlicki1184
    @johnpawlicki1184 6 ปีที่แล้ว +1

    Great video as usual. I would like to see a simple file server setup with Samba. Great stuff.

    • @loughkb
      @loughkb  6 ปีที่แล้ว

      That's an idea. My file server here is linux/samba. When I worked at the last job, I built a linux file server that the company relied on. Robust as heck.

  • @john-r-edge
    @john-r-edge 3 ปีที่แล้ว

    Good stuff. Does this take "dot" folders across?
    There is a GUI app Grsync which puts a GUI over rsync; tho it does show the rsync command it is about to execute - so instructive too.

    • @loughkb
      @loughkb  3 ปีที่แล้ว +1

      Yes, it will copy all hidden files as well. the -a flag puts it in 'archive' mode and it should get everything when run as superuser.

  • @luke752010
    @luke752010 5 ปีที่แล้ว

    Outstanding video! Can I use rSync also for cluster computer in order to sync the files changes between the nodes ? For example implementing an http load balancer and my target is to keep in sync all data changes between nodes (severs). So if a file has been changed on one server I need to propagate the changes on the other nodes servers...

  • @meggrobi
    @meggrobi 6 ปีที่แล้ว

    If you use Windows as well then Delta copy is good choice to use rsync on both platforms.

  • @wasabisohot
    @wasabisohot 6 ปีที่แล้ว

    Thanks for the video! Helps me in a proof of concept of setting up a backup system with an rpi3 nas

  • @salat
    @salat 6 ปีที่แล้ว +2

    You can do a poor man's versioned backup (using a target filesystem that supports linking) with the parameter '--link-dest'.
    I use it to keep the last 30 backup version without wasting too much space - until ZFS with native encryption is stable :)

  • @Scott-K7sce
    @Scott-K7sce 6 ปีที่แล้ว

    as a linux person since 2003 i'm not afraid of the terminal, i use it quite often

    • @exploretheworld17
      @exploretheworld17 5 ปีที่แล้ว

      thanks for sharing , however seems not related to the video

  • @JanBusk
    @JanBusk 6 ปีที่แล้ว +3

    Check out borg. Super easy backup tool with version handling, encryption etc. Almost a life changer for me.

    • @salat
      @salat 6 ปีที่แล้ว +1

      Thanks for that! I see it can deduplicate - even saves space on moved files, etc. Gave it a try and like it!

    • @iflnr978
      @iflnr978 5 ปีที่แล้ว

      thanks, but now; 2019 Aug, what do you think about ZFS encryption and zdev mirrors? is that ready ready for use? if so, how does it compare to borg?

  • @dominus6695
    @dominus6695 3 ปีที่แล้ว

    The bots I use have a lot of files and it gets slow AF to use this with all that comparing files that are constantly changing. Will be copying via SFTP or so. Any tips to make it faster, welcome.

  • @mandrael
    @mandrael 3 ปีที่แล้ว

    So you describe how to mirror a source to a destination, but how to _backup_ ist with rsync? This means there are _versions_ or at least a subfolder with deleted or changed files.

  • @arjunshinde7
    @arjunshinde7 2 ปีที่แล้ว

    Thanks for making this video. The content is really great 😊

  • @greywolfe6444
    @greywolfe6444 6 ปีที่แล้ว

    You spoke of backing up to file server, but did not show an example. Would have been nice to see.

  • @sledziuYT
    @sledziuYT 5 ปีที่แล้ว

    Hello, great video first of all. I have question, is there possibility or script to run automatically Rsync when i plug Pendrive into PC and copy all of content from USB stick to folder on computer?

  • @ChioTB
    @ChioTB 5 ปีที่แล้ว

    hmm! you did kind of backup . but what about restore ?? or is just copy the file you synchronize from to the same folder ? that's it? or? ... any how there is also another method , a software called " Grsync " for me this (Grsync) is very difficulte ..

    • @loughkb
      @loughkb  5 ปีที่แล้ว

      To restore, do the same but switch the source and destination file paths.

  • @mostafashawki
    @mostafashawki 5 ปีที่แล้ว

    Awesome video, thank you.
    Could you tell what software do you use for screencasting?
    Thanks in advance :)

    • @loughkb
      @loughkb  5 ปีที่แล้ว +1

      OBS. Its available in the repositories.

    • @mostafashawki
      @mostafashawki 5 ปีที่แล้ว

      @@loughkb Many thanks :)

  • @blueconcretezebra
    @blueconcretezebra ปีที่แล้ว

    Rsync is far from easy to get working as you describe. It has far too may switches, which have vague descriptions. If you are on a local network use cp with the update switch for a more predictable result. Over the net, well try rsync but be prepared for frustration.

  • @sengokugensui4129
    @sengokugensui4129 5 ปีที่แล้ว

    4:27 rofl click multiple times for lolz. Great video! thanks!

  • @SwiatLinuksa
    @SwiatLinuksa 4 ปีที่แล้ว

    Thanks!

  • @grahamarcher2729
    @grahamarcher2729 5 ปีที่แล้ว

    This video has been very helpful. Thank you very much!

  • @jeffminnick5209
    @jeffminnick5209 6 ปีที่แล้ว

    Which repeater do you usually monitor 2m?

    • @loughkb
      @loughkb  6 ปีที่แล้ว

      The 146.91 machine. I listen off and on through the day.

  • @jeep456789
    @jeep456789 4 ปีที่แล้ว

    Need more options

  • @Liv4IT
    @Liv4IT 4 ปีที่แล้ว

    Thanks for sharing ;)

  • @bharat_kumar_tech8714
    @bharat_kumar_tech8714 5 ปีที่แล้ว

    informative. Thank you very much

  • @quaternion-pi
    @quaternion-pi 6 ปีที่แล้ว

    Very helpful. Can you use the same trick to find the location of network attached servers on your intranet? -73 de K6CCA

    • @loughkb
      @loughkb  6 ปีที่แล้ว

      You could find the path to where it's mounted on your computer. If that's what you mean.

  • @786jinga
    @786jinga 6 ปีที่แล้ว

    Awesome Video Kevin!

  • @auj5901
    @auj5901 5 ปีที่แล้ว

    what if I already have separate stuff on my hard drive and I only want to sync one or two folders? I'm scared my entire drive will delete

    • @loughkb
      @loughkb  5 ปีที่แล้ว

      Use the same command, but narrow it down to the specific folder paths. Rsync can sync devices, single folders, or even individual files. Just use the complete path.

    • @auj5901
      @auj5901 5 ปีที่แล้ว

      @@loughkb Thank you! I did it with fingers crossed. It worked. Thank you for helping with your video. Do you know if it's possible to set up as a cronjob?

    • @loughkb
      @loughkb  5 ปีที่แล้ว

      Yes. That's how we did it on our servers the last place I worked.

  • @willgilliam9053
    @willgilliam9053 6 ปีที่แล้ว

    Awesome video about an awesome tool!