Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36

Thread: Easy Way To Backup Your System!! (Bash Script)

  1. #21
    Join Date
    Mar 2009
    Beans
    927
    Distro
    Ubuntu 12.04 Precise Pangolin

    Arrow Problems

    Quote Originally Posted by lonewaster View Post
    yeah...I will put a warning on the main page.
    The thing is man, as i said, i'm not, nor am I claiming to be, a professional programmer.
    Anyone who wants something better can do so, and anyone wanting to keep their stuff more secure will no doubt have the ability to encrypt their files in a backup. Or at least the ability to learn how to do so.
    This is just aimed at people who don't know any better or who, like my dad for instance, don't want to spend time learning a new OS from start-to-finish and just want it to "work".
    I never claimed this to be flawless, but hell no script is completely without fault.

    anyway, it's not as if anyone is going so sue me.
    I have nothing. and i mean NOTHING.
    So if you are thinking of suing me- think again. you will only cause yourself some significant financial loss.

    I'd like you to give me a few examples of these problems you're talking about, and how you discovered them. Just for personal interest.

    thx.

    !!! VIVA LA LINUX !!!

    lonewaster
    Thanks, just didn't want some newbie thinking 'Hey, great, I have a backup program, now my computer is foolproof.'. Like I said, no offence meant.

    Some of the main issues:
    • Doesn't check if it has root permissions
    • Doesn't check if they entered a valid username
    • Changes the permissions on the backup
      • What do you gain by changing permissions?
      • The backup archive is open to anyone - minor security risk
      • When you restore from the backup, the whole system is open to anyone - major security risk
    • The sleep statements serve no purpose
    • Probably want to look into excluding the gvfs file
    • Might want to look into rsync - it considerably speeds up backups


    Also, you are putting the backup in ~/backup.tgz and then excluding /backup.tgz from the backup (not the same file). You really should make the backup at /backup.tgz:
    Code:
    sudo tar cvpzf /backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/media /
    Then you won't have to worry about asking for a username either.

  2. #22
    Join Date
    Mar 2010
    Beans
    40

    Exclamation Re: Easy Way To Backup Your System!! (Bash Script)

    Thanks man, no offense taken.
    No problem, I'm working on addressing they kind of issues now.
    Thanks for the tipoff about the file location stuff- I had forgot to fix that bit.
    And the sleep functions were really just an excuse to use them =P
    Yeah I have been looking at other methods of backing up and also how to improve this script.
    I changed the file permissions because the backup.tgz wasn't showing in my file browser unless I was set as root, and that fixed it. That's inevitably why I put the file in the home folder after that. It's going back to root now though.

    As I said, I welcome ALL kinds of input, so long as it is meant for the purpose of improvement. Constructive, you know? I dislike people who diss on those who are trying to learn. After all, isn't that partly what open-source software is about? (allowing people to learn from it)

    I will be adding a newer version of the script in a few days, with improved function and security.

    QUESTION: I'm thinking of adding a switch to allow the user to select an encrypted backup file. Good Idea? I figure that would secure it up a bit, and alongside my securer update it would maybe help move the script forward?

    !!! VIVA LA LINUX !!!

    lonewaster

  3. #23
    Join Date
    Mar 2010
    Beans
    40

    Re: Easy Way To Backup Your System!! (Bash Script)

    Hey,
    Just to let anyone who cares know that I'm going to implement rsync into the backup script and possibly an encryption method.
    I will include an install script for those who just want to use it, not learn how it works or how to do it manually.
    Shouldn't be long.
    Cheers.

    !!! VIVA LA LINUX !!!

    lonewaster

  4. #24
    Join Date
    Mar 2010
    Location
    The World, Europe, Latvia
    Beans
    14
    Distro
    Ubuntu 9.10 Karmic Koala

    Exclamation Re: Easy Way To Backup Your System!! (Bash Script)

    In reality backup should be task for root exclusively. Just for one reason - not all files in file system are readable by user and there may be important files left out.

    It's ok for learning, but the best suggestion for newcomers from Redmond hemisphere would be to get GUI application like "Simple Backup Suite". Its package name is sbackup and description goes like this:
    Simple Backup Suite is a set of backend backup daemon and GNOME
    GUI frontends that provide a simple yet powerful backup
    solution for common desktop users.

    Backups can be written to local directory or remote servers using
    GNOME VFS technology. A fine control is possible regarding what
    folders and files to backup. Files can be excluded even with a set
    of regular expressions. Regular backups can be scheduled.
    do I have to say more?

    Although the package is in universe section and not supported by Canonical it works great for common desktop backup tasks.
    That may be THE easiest way for those who come from windows environment.

    Also no offense intended. Keep learning and share what you've learned. That's the real open-source spirit after all.

  5. #25
    Join Date
    Mar 2010
    Beans
    40

    Re: Easy Way To Backup Your System!! (Bash Script)

    i agree- anyne who wants an easy way to backup should use the method in the post above this.
    i will pst my updated bash script when i have worked on it,
    thing is, i have been working on perl scripting lately, and haven't really had the need to write any bash.
    i will update it, but as i said- i think anyone like my dad (who is coming from a windows or mac environment and wants their new OS to just 'work') should go with the application linked to by the poster above me ( AndyDeGroo )

    thanks for all constructive criticisms and thankyous, it was nice to have people comment on some of my programming for once.
    and AndyDeGroo - that is the spirit of open-source, and it is the spirit flowing through my veins.
    to learn, to make, to improve, to better. it is my drug. and i am completely addicted.

    so, if you want to see a new version of the backup bash script with a newer tutorial, then check back here over the next few weeks.
    i just have to finish my perl IRC client that im making and then i will update the bash script stuff, maybe write a new one for something...

    thanks again all

    billy

  6. #26
    Join Date
    Mar 2010
    Beans
    40

    Re: Easy Way To Backup Your System!! (Bash Script)

    i have rewritten this script using rsync and instead of continuing to post in this practically dead thread, i will put it in my package that i am making.
    no name for it yet (not a DEFINITE name, anyway) but the package will consist of
    this backup + restore script
    my installed package backup script
    and more.
    so keep an eye out on the beginner section.
    and on www.swedger.com (my site) - i will be hosting it on there when it is ready for release.

  7. #27
    Join Date
    Mar 2010
    Beans
    40

    Re: Easy Way To Backup Your System!! (Bash Script)

    i have created the first installment of my new toolkit. i am going to make a new thread for it, so just search the forums for ' Swedger-Toolkit ' (no quotes) and go there.

    http://swedger.com/swedgertoolkit-1.5.tgz << direct download if you wanna look =)
    make sure and read the new thread for info regarding the toolkit though!!

    -darksider-

  8. #28
    Join Date
    Mar 2009
    Beans
    927
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Easy Way To Backup Your System!! (Bash Script)

    You should think before putting it under the GPL. I release all my work in the public domain because I want anyone to be free to use my work as they please.

  9. #29
    Join Date
    Mar 2010
    Beans
    40

    Re: Easy Way To Backup Your System!! (Bash Script)

    yeah, a friend suggested the BSD license.
    i might write my own, so i can perfect it for this particular package & purpose.
    thanks for the input, what did u think of the program(s)/script(s) themself?
    any ideas/suggestions are welcome.
    i would also like to invite anyone who has scripts or programs they'd like to add into the toolkit to do so through me, that way it will be in the original and official version of SwedgerTK.
    feel free to patch/upgrade/etc and lemme know, just remember and comment it and document what you're doing for users and for me so if i am adding it to a release i can understand it for implementation and possibly a little editing.

    all content of swedger-toolkit version 1.5 (and earlier or later versions) are the sole property of their respective creator(s)/author(s) and their affiliates, swedgerdotcom(swedger.com) and it's affiliates and staff, and of darksider himself (original author of swedgerdotcom(swedger.com) and the Swedger Toolkit).
    SwedgerToolkit and all relevant materials are subject to the relevant licensing information.
    they are free to download, modify, distribute, patch, and host on websites - but ALL credits/comments must be left INTACT.
    anyone who writes new content code/programs should submit it to me personally for validation and implementation.

  10. #30
    Join Date
    Mar 2009
    Beans
    927
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Easy Way To Backup Your System!! (Bash Script)

    Nice work making all those from scratch, really great programs, sadly the internals are lacking. Also, I think you've way overdone the amount of text on the hex-table page, no one is likely to use it if you're forcing them to keep that text in place.

Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •