Linux Backup with TAR and Cron Jobs

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 227

  • @movie_nightmares
    @movie_nightmares 9 лет назад +9

    Eli is the first source of information when I want to learn something new or just review things I have not worked with in a while. He is clear, easy to understand and the material he uses to show you something is easy to get.

  • @niaei
    @niaei 10 лет назад +6

    Two questions:
    1) How to exclude more than one path?
    Like: I don't want to keep /mnt and /media and /tmp
    2) How to create a backup file for more than one path?
    Like: I want to create an archive file, and I want it to include /usr/share and /bin and /var/www.
    BWT sir, you're awesome.
    Keep do this. :)

    • @oliverwyatt236
      @oliverwyatt236 4 года назад

      tar -xvpzf your_backup.tar.gz --exclude={"/home/*/Downloads/","/home/*/Documents"}

  • @gregjachtoma6490
    @gregjachtoma6490 8 лет назад

    Einstein said that any intelligent fool can make things bigger, more complex.
    But it takes a touch of genius and lots of courage to move something in the opposite direction.
    Thank You for this tutorial

  • @arasonsuresh1042
    @arasonsuresh1042 8 лет назад

    Thank you so much for making Linux so simple to understand. You are the best teacher ever! I watched all the 9 videos from introduction to the end, every class was very easy to understand and I would be glad to watch all your classes. You just earned a subscriber.

  • @SwingingInTheHood
    @SwingingInTheHood 3 года назад

    Here we are, some 10 years later, and THIS is still the best way I could find to back up my Linux systems (maintaining permissions and symlinks) to a NFS mounted NAS drive and AWS S3 bucket.

  • @GrantTurnerMusic
    @GrantTurnerMusic 12 лет назад

    Great instruction. Just moved a website to a dedicated server and plan on using this to perform backups. Thanks dude!

  • @songsanams6355
    @songsanams6355 2 года назад

    you are a star after this many years, no one has such a great description

  • @GaryCameron780
    @GaryCameron780 2 года назад

    Watching in 2022. Eleven years later this is still very useful. thank you.

  • @hipman87
    @hipman87 8 лет назад

    I just went through your whole Linux course tonight, massively appreciated, very clearly presented.

  • @MrHav1k
    @MrHav1k 10 лет назад +9

    Eli you have by far the best tutorials on RUclips! I've learned so much from these linux videos and I love how you focus on what matters!

  • @mazdysoraya6121
    @mazdysoraya6121 11 лет назад

    what a king you are! That is how things should be explained. I run into many tutorailas that skip points that make people confusing..Thank you

  • @rimmiloud
    @rimmiloud 10 лет назад +6

    Excellent Teacher I have seen in my life Since I started the school on 1978

  • @stephenjasonwang
    @stephenjasonwang 12 лет назад +1

    Can't wait for tom to watch this so i'm watching it now... watched your whole Linux class straight and i loved it.. THANKS ALOT!

  • @REDCAES
    @REDCAES 10 лет назад

    Thx Eli you are the bomb!! I've watched about 35 of your videos so far and haven't been disappointed yet, thanks for making it easy to grasp!

  • @telao492
    @telao492 2 года назад

    I wish I would have found you weeks ago! Thank you for explaining this down to the meaning of each character. Much appreciated!

  • @sandhyasingh7356
    @sandhyasingh7356 7 лет назад

    you made my life a lot easier with this video.....keep posting these kind of videos...you are too good in teaching eli

  • @yanxiang1987
    @yanxiang1987 8 лет назад

    Thanks Eli for your patient and clear class. I learned a lot from you.

  • @prabeshines
    @prabeshines 11 лет назад

    wOw!!!!!!
    I never thought I would learn Linux this fast.... 2 Days and i know hell lot of things....
    .
    THUMBS UP ELI !!!! U R AWESOME

  • @208dharma
    @208dharma 8 лет назад

    Thank you for your efforts to share your knowledge to everyone who wants. These are very helpful me.

  • @vsworld7757
    @vsworld7757 9 лет назад

    Best Video, your narration is too good to keep track of and your recap actually makes it hard to forget! Thank you soo much! Look forward for more videos :)

  • @elithecomputerguy
    @elithecomputerguy  13 лет назад

    You can backup /
    If you need a bare metal backup you can just use a piece of backup software.

  • @patlab555
    @patlab555 7 лет назад

    Woow AWESOME course!
    You are taking time explaining every single thing, + you are speaking at a perfect pace for a non-native English speaker
    Thumb up + Subscribed
    Are the 19 who disliked your video, tried it on Windows?

  • @calingiurgiu2000
    @calingiurgiu2000 10 лет назад

    God bless you Eli! Your videos are lifesavers! Thank you ! I wish I could replace my current teacher with you.

  • @iliketobathify
    @iliketobathify 7 лет назад

    Nano is an excellent editor for those finding Vim too difficult.

  • @Bubblegan
    @Bubblegan 7 лет назад

    Fantastic tutorial. I am so happy that I found your channel. Keep up the great work.

  • @Rchauhan902
    @Rchauhan902 8 лет назад

    thank you sir for your valuable videos. I learned lots of thing from basic to advance from your tutorials.
    thanks a lot

  • @ernestoearlsalunat3785
    @ernestoearlsalunat3785 7 лет назад

    Awesome job Eli! I had so much fun and boosted my confidence. Cheers!

  • @lvscan
    @lvscan 10 лет назад +1

    Excellent Video. Thanks for helping me understand Linux a little better!

  • @serverguy276
    @serverguy276 9 лет назад

    Eli, you are great, nice video and presentation. I enjoy watching all of your video.

  • @Waldi111979
    @Waldi111979 11 лет назад

    hi Eli, I have an idea for part two of this tutorial - I intend to do backup of my system, so that once it will get corrupt (after update/upgrade), I could go back to previous working Linux before corruption of the system.
    That's something I am missing in this tutorial.
    BTW - your tutorials are amazing! I've seen around 20 to date and they are so easy to understand! thank you for sharing with your knowledge with us publicly. cheers!

  • @jimfurman3145
    @jimfurman3145 7 лет назад

    Awesome I was searching for a linux backup program .... but this is so simple ... thanks!

  • @prashanthb6521
    @prashanthb6521 3 года назад

    This was so well explained. Thanks a lot ETCG.

  • @Axel-rs3cg
    @Axel-rs3cg Год назад

    appreciate your videos lessons and logical well expressed manner 👍

  • @fabriziodutto7508
    @fabriziodutto7508 4 года назад

    All very good! Except using wordpress :-) Thank you for sharing! Just wanna add that performing the tar -c.. command is NOT adding new nor updating old files inside the tar.gz file, every time it overwrite them, just take it into consideration! Also you can recover a single file from the tar, by using the --file option.

  • @lalitpnwr
    @lalitpnwr 11 лет назад

    Eli you are a awesome teacher

  • @FranseFrikandel
    @FranseFrikandel 11 лет назад

    Yes you can, everything you can do with the server can be done with the desktop using the terminal

  • @kewlbeans9905
    @kewlbeans9905 10 лет назад +1

    Thank you kind brother. You are a gentleman and a scholar.

  • @gmc9753
    @gmc9753 12 лет назад

    Linux has a very helpful command called "file". This command can tell you what a file contains based on the contents of the file. It can tell you that a file is a compressed file, tar file, mp3 file, python file, etc. etc. So if you do create a compressed tar file called "Bob", you can identify it years later!

  • @morningstars123
    @morningstars123 12 лет назад

    thanks.. Happy to say u are my Linux teacher ..

  • @PratapKanhed
    @PratapKanhed 8 лет назад

    Thanks for All lectures

  • @CaryInVictoria
    @CaryInVictoria 7 лет назад

    I've been enjoying these tutorials and find them very helpful. Three questions: 1. when extracting from a tar ball, why must you tell tar the file is compressed. Can't it figure that out itself? 2. If I want to schedule a cron job to be performed every Tuesday and Thursday would I enter "24" in the day-of-week location? 3.Suppose I want to schedule a backup once per day with cron, but I don't want the tar ball created today overwritten by the tar ball created tomorrow. I assume there's a way of avoiding that.

  • @eventhorizon1306
    @eventhorizon1306 6 лет назад

    Great series...Thank you Eli.

  • @srinivasachakradhar2442
    @srinivasachakradhar2442 8 лет назад

    The way you presented Linux videos were really fantastic and it was very crystal clear.Can you share me the link if you have complete Linux Courses Videos....

  • @Grezic
    @Grezic 12 лет назад

    IT's very easy to understand, thanks very much.

  • @thetlwintint
    @thetlwintint 12 лет назад

    thank you very much. You are a really great trainer.

  • @IvarsRuza
    @IvarsRuza 10 лет назад

    There is lot more to tell about tar. t - option/switch/argument for me is the sugar when I use tar . Width a "t" option/switch/argument You can look inside tar archive :) Also its possible to extract one file after You had a look with a "t" option. About sudo - I belive Eli has configured sudo to be used without a password for certain non authoritative user to operate with system as a root. It's wrong - sudo loses the concept why it was made :) Also using sudo in cron - it's wrong for most of us, in case of Eli - as I said, I believe he has made one non authoritative user to be used without password. Also - sudo - it is not in all Linux flavours / distributions. Eli I would enchant this video course. But!!! Even for me it was great to listen - You are great orator. Good Job.

  • @jeanettemartinez892
    @jeanettemartinez892 4 года назад

    Best video yet, you saved my brain thank you!

  • @reddysekhar0072000
    @reddysekhar0072000 6 лет назад

    tq eli, u r making my life easy

  • @DavidJKoch
    @DavidJKoch 10 лет назад

    Excellent tutorial series on Ubuntu Linux !

  • @aplifiedchaos
    @aplifiedchaos 5 лет назад

    Many thanks buddy. You got yourself a subscriber

  • @vdenim86
    @vdenim86 12 лет назад

    whole day i had struggled and got this video thank u very much , please some video of apache and mysql thanks eli

  • @Kreosification
    @Kreosification 12 лет назад

    Parameters can always be mixed for example ls doesn't care if you type "ls -RQ1" or "ls -1QR" :)

  • @DJ369-Miami
    @DJ369-Miami 10 лет назад +6

    You forgot to mention that you have to start the cron daemon with /etc/init.d/cron start

    • @makondoo
      @makondoo 5 лет назад

      i did not start cron daemon with that and it works - Kubuntu 18.4

  • @ChrisLCBoston
    @ChrisLCBoston 10 лет назад

    Excellent video again!!

  • @shayaanmandal3917
    @shayaanmandal3917 5 лет назад

    Still so much powerful videos

  • @ciscomind626
    @ciscomind626 9 лет назад

    I like Your Channel So much You are the best teacher i ever had !
    You are amazing Guy Too bad I can't join you in real Classroom With my laptop :)
    have a nice Day Greeting from Algeria

  • @shikhavyaghra8969
    @shikhavyaghra8969 8 лет назад

    Thanks for the video....I was struggling with this.This video helped me to solve my problem.

  • @amabowilli
    @amabowilli 8 лет назад

    Eli, I love your tutorials and how much you simplify them. Can you make a video on red hat or Centos kick-start? i mean the distribution doesn't matter if its a Linux kick start.

  • @liketocode
    @liketocode 10 лет назад +5

    Love your videos - educational while entertaing :)

  • @455rocks
    @455rocks 10 лет назад +8

    Sir,can you please do a video on Shell scripting(Bash and Perl)?

  • @djsensacion7
    @djsensacion7 9 лет назад +1

    Thank you for the detailed explanations of it all.

  • @Kreosification
    @Kreosification 12 лет назад

    It depends on what you want to compress. Video/Audio/Image files aren't really cut for compressing. Text-Files profit the most probably.

  • @JamesSamples
    @JamesSamples 3 года назад +1

    LOL, Dang it ELI!!!
    I watched this video trying to remember if its:
    ....--exclude=/mnt.... or
    ....--exclude = /mnt... with spaces
    Eli: "I'm not going to exclude anything, just to make life easier..."
    LOL that was funny

  • @explosivo3065
    @explosivo3065 4 года назад

    This video helped me a lot
    Thanks !!!

  • @KalishAlexander
    @KalishAlexander 10 лет назад

    thanks a lot, your lessons are very informative and useful.

  • @mehretabhailegebriel
    @mehretabhailegebriel 4 года назад

    Great tut!

  • @jkupas
    @jkupas 11 лет назад

    Thanks a lot, you can explain amazingly simple.

  • @mr_gumball
    @mr_gumball 8 лет назад

    OMG, Thank you. This is the one of the most useful tut

  • @BornWithLegend
    @BornWithLegend 7 лет назад

    superb sir thanks for upload

  • @machst3m
    @machst3m 12 лет назад

    just realized that your description has the file .taz.gz in your extension. It won't affect the file at all, just something I realized.

  • @EliotPearson
    @EliotPearson 12 лет назад

    Solid overview Eli.

  • @GeorgeLathem
    @GeorgeLathem 6 лет назад

    I miss this Eli

  • @nachoherranz1240
    @nachoherranz1240 10 лет назад

    Great teacher

  • @dai7169
    @dai7169 5 лет назад

    Thanks a lot Eli

  • @youcef2128
    @youcef2128 12 лет назад

    thank u so much ur amazing and awsome for averyone intersted

  • @Watchittttttt
    @Watchittttttt 4 года назад

    You are awesome sir

  • @Sawta
    @Sawta 10 лет назад +1

    I haven't researched these questions yet, so I'm sure that there's an answer out for this but it would have been nice if they had been covered in the video:
    1) When running these scheduled cron jobs, is there a way for it to check to see if hardware is active and above a certain level first (say, CPU above 95% and the fans are going nuts), or if some specific program is already running, wait for that task to finish before proceeding with the backup? It sure would suck if you suddenly had cron trying to do a full / backup when you're running some extremely intensive program.
    2) When a new cron job backup is run, will it overwrite the existing tarball in that directory, or does it automatically increment the tarball filenames in some fashion? I.e. backup.tar.gz1, backup.tar.gz2, etc. I'm assuming that it just overwrites the old file. Does anyone happen to know how you would get cron to avoid overwriting previously created backups?
    3) This is really great tutorial for full backups, but how would you go about performing differential or incremental backups? My guess is that the answer is going to be "Just always do Full backups", but there have to be at least *some* cases out there where doing full backups, even with compression, simply wouldn't be acceptable (think 20TB backup when only a 1kb txt file has been modified).

    • @soyargentino200
      @soyargentino200 6 лет назад

      1) yes you can. there are two ways of doing it. the first using ps aux | grep crontab. and the other is with top

  • @wubalm
    @wubalm 11 лет назад

    I like your lessons - very clear and simple. I am learning a lot from your lessons.
    I have one question. How can we backup to external hard drive from the command line. I am new to linux and I would appreciate if you teach us about this. Thanks.

  • @umesh6254
    @umesh6254 7 лет назад +1

    Sorry Eli, I know your video is good.. but in the video how did you get wwwbackup.tar.gz?
    Did you just go through vi and make that empty file or what? Whenever I enter the same command, it says it's not a file or directory or permission denied..

  • @isnadsultana3550
    @isnadsultana3550 5 лет назад

    Your video is so helpful and informative. Can post another video for how to automatically backup files for all users home directory using tar and shell scripting?

  • @Waldi111979
    @Waldi111979 11 лет назад

    hi Eli,
    I watched the video again and you explain a bit how to backup parts or the whole system and how to recover tar ball file, but I was thinking about step-by-step backup of the whole sytem and especially detailed guide how to recover that system, so that it will not have to be re-installed, but just recovered from the tar ball file. for me it looks kind of rocket science, but you probably would say that all was explained already... . anyway, if I will find out somewhere on google.:)

  • @waristechtips
    @waristechtips 7 лет назад

    Eli thanks for the informational video. quick question, when you did the crontab -e and it opened up crontab and had
    the # m h dom mon dow cheat-sheet, had you already input that into crobtab file for the sake of the video or did the earlier versions of Linux distributions already have that? I am using centos 7 and it doesnt have that little cheat-sheet. I know that its just a comment because of the # sign but i was just wondering. Thank you :)

  • @cimimonsti
    @cimimonsti 11 лет назад

    Can you do one with Rsync? They way you convey everything is great!

  • @gps6167
    @gps6167 12 лет назад

    Awesome !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @perolin3
    @perolin3 9 лет назад

    Eli thanks for all this videos
    Small problem on this:
    In the Lesson „Linux Backup with TAR und Cron Jobs“ something with the order oft the virtual sessions is messed up. The terminal sessions are starting in the middle and later from begin.

  • @JAMESLINUXCOFFEE
    @JAMESLINUXCOFFEE 9 лет назад

    Eli I have been a huge fan of yours since my first computer back in 2001 and now in 2015 i am in need of a new computer within 6 months or less. What OS based computer would you recommend for running ecommerce apps? Windows or MAC?

  • @andreymosienko6227
    @andreymosienko6227 9 лет назад

    Hi Eli. Thank you for really helpful course. Excellent presentation of the material.

  • @Ajitsingh-gc5ej
    @Ajitsingh-gc5ej 11 лет назад

    hey eli ...gr8 job man .!!! please upload more video of servers like ftp, samba, dns, nfs. thnx alot again

  • @TheAnigai
    @TheAnigai 8 лет назад

    But what about say for February 28th or 29th if applicable for a scehduled cronjob?
    If i want to run a backup on the 30th of every month would I be right in assuming that if the month does not have 30 days then it would revert to running the job on the closest day?
    How about bi-weekly backups?
    I assume that's also setting the day interval to 14 right?
    Awesome tutorial man, I love your videos.

  • @momgvisions6249
    @momgvisions6249 7 лет назад

    Is there an advanced playlist? This one was perfect!

  • @bdf2718
    @bdf2718 7 лет назад +3

    You were still doing backups with tar in 2011? Srsly?
    Sheesh, I stopped using tar for backups around 2000. That's when I learned that rsync existed. To another disk on the same server there's no advantage with rsync (but no disadvantage either). Rsync over ssh to a disk on another server and you get what is effectively a full backup but with data transfer amounting to less than an incremental backup. Rsync is designed to work well even with high-latency connections, so with the reduced data transfer daily full backups to remote sites is feasible. No faffing about backing stuff up onto removeable media and remembering to take it offsite.
    Plus you can have rsync automatically populate a directory with the files that changed or were deleted. So in one operation you can have a full backup and a decremental backup (like incremental but going back in time) with data transferred less than for an incremental backup.
    Or if you want you can have it create the equivalent of Microsoft's shadow volumes giving what appear to be full daily backups but with actual storage only of the unique files (don't forget to allocate some extra inodes to that disk when you create the filesystem) and data transfer amounting to less than an incremental backup.
    Tar was obsolete 16 years ago. You really ought to consider removing this video because it's giving people a *bad* solution to making backups. The only time tar is sensible is for archiving to tape, and archiving to tape isn't sensible when you can rsync to disk. So unless you're the NSA and keeping vast amounts of data forever, rsync is a far better solution.

    • @kas1987kas
      @kas1987kas 7 лет назад

      Yes, much better than tar. I prefer Bacula.
      Also why backuping eg: /usr? You need only: packages list, /etc, /var (and /srv, /root, /home, etc).

    • @bdf2718
      @bdf2718 7 лет назад

      Nice troll. You prefer bacula. With four arcane components to configure, requiring a degree in rocket surgery to figure out. That goes horribly wrong if there is even minor clock skew. That can purge backups which later incremental backups depend on, rendering the incrementals useless and your recovery strategy fucked. That transfers an entire multi-gigabyte file if a single byte changes (tar has the same failing, rsync does not). Optimized for backup to tape, sucks big time for backup to disk. Plus many other lesser problems.
      Nice front-end, shame it's a bitch to configure and performs crappily. Yep, perfectly sane alternative to rsync, or even command-line tar. Marginally preferable to using pencil and paper to write down the pattern of 1s and 0s of the files, then restoring using a hex editor to type them back in.
      Oh, and the name means "penis bones" (something most mammals have, humans are one of the few exceptions).
      But it looks pretty, and that's what counts, eh? Oh, and it's always handy when you want to troll a discussion about sane backup strategies.

    • @kas1987kas
      @kas1987kas 7 лет назад

      Bacula isn't hard to use or understand. You can also use BackupPC or Amanda or rsync or even back in time. Nobody force you.
      > Yes, much better than tar.
      I say it about rsync.

    • @kas1987kas
      @kas1987kas 7 лет назад

      To clarify:
      > Bacula isn't hard to use or understand.
      I mean, if you sysadmin you may be forced to learn it. For desktop user is too much imho. Simpler is back in time or dejadup, etc.

  • @geekfromthehills
    @geekfromthehills 11 лет назад

    grt job eli..

  • @ramireddypoli8873
    @ramireddypoli8873 8 лет назад

    thank u
    i saw ur videos
    it helps mee...
    thank u

  • @ganimikawa
    @ganimikawa 9 лет назад

    Great video...

  • @mutangaeric6352
    @mutangaeric6352 10 лет назад

    hello computer guys your videos are good it's help us to be come IT professionals

  • @arunmohan1211
    @arunmohan1211 7 лет назад

    usefull...superb

  • @raysaul
    @raysaul 7 лет назад

    Hi Eli I have a question for you, is there a way to backup an entire ubuntu system and restore it with this command or any other terminal like command? I am playing with a vm that is in a hypervisor which I do not have access to and I would like to have that vm backed up to a local machine (through ssh) and how will I go about restoring it?
    To my understanding, since I do not have access to the hypervisor I cannot use clonezilla or any other tool like that, I do not have access to the boot menu and such. So I am guessing (from what I am encounter) it is impossible to backup the vm, it is recommended to backup only certain files for example just the www folder instead of the whole system.

  • @asandol
    @asandol 9 лет назад +6

    Hi Eli ! Great videos ! just for you to know. There is a problem (at least for my view) on 11:17. It does not show you type the commands for the tar...only shows when it's finishing !. Best regards !

    • @rafnaegels8913
      @rafnaegels8913 6 лет назад +1

      Adrian Sandol he does show the command afterwards.

  • @BrianThomas
    @BrianThomas 9 лет назад +1

    Great video. Question. What if you wanted to transmit that backup off site to another Linux machine on a schedule? How would you do that?

  • @malikhaider366
    @malikhaider366 11 лет назад

    *** 5 STAR *** for you as always ...