Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Backup in external hard disk

  1. #11
    Join Date
    May 2008
    Beans
    2,139
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by AnupamMitra View Post
    I read the backup script in the given link. I tried to do according to my ability but couldn't succeed. The outcome is given below. Frankly speaking I'm a layman and trying to learn at the old age of 70.
    I would suggest that you have a look at grsync.

    It is a GUI for rsync and it may make back-ups a bit easier for you.

    Code:
    sudo apt install grsync

  2. #12
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Backup in external hard disk

    Quote Originally Posted by AnupamMitra View Post
    I read the backup script in the given link. I tried to do according to my ability but couldn't succeed. The outcome is given below. Frankly speaking I'm a layman and trying to learn at the old age of 70.
    Yeah. This is one of those things where it is pretty simple when someone shows you how, but can be completely baffling if you've never done these things before. I understand your difficulty.

    Is there anyone you can video chat with who understands Unix scripting, just a little? 5 minutes with them explaining some basics is probably all you need.

    In the meantime, https://help.ubuntu.com/community/Be...ting#Scripting may be enough to get over the hump you've hit.

    The linked script must be run with 'root' elevated permissions for a number of reasons. It will not work for normal users and it will not make correct backups if run as a normal user.
    Last edited by TheFu; August 30th, 2020 at 05:11 PM.

  3. #13
    Join Date
    Sep 2009
    Location
    INDIA
    Beans
    155
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by tea for one View Post
    I would suggest that you have a look at grsync.

    It is a GUI for rsync and it may make back-ups a bit easier for you.

    Code:
    sudo apt install grsync
    Thanks, it is already installed.

  4. #14
    Join Date
    Sep 2009
    Location
    INDIA
    Beans
    155
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by TheFu View Post
    Yeah. This is one of those things where it is pretty simple when someone shows you how, but can be completely baffling if you've never done these things before. I understand your difficulty.

    Is there anyone you can video chat with who understands Unix scripting, just a little? 5 minutes with them explaining some basics is probably all you need.

    In the meantime, https://help.ubuntu.com/community/Be...ting#Scripting may be enough to get over the hump you've hit.

    The linked script must be run with 'root' elevated permissions for a number of reasons. It will not work for normal users and it will not make correct backups if run as a normal user.
    Thanks for your continuous support. The Cog has pointed out certain mistakes I have committed. But one thing, what should I mention at $HOSTNAME? Should I write SEAGATE or anything else? Kindly guide at your convenient.

  5. #15
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Backup in external hard disk

    The hostname is already set by the running shell.

    Many people may have more that 1 computer and having their backups go to a directory for each different computer is smart. This is useful both for network backups and if the backup storage is USB plugged and unplugged into each computer as needed. I have about 20 systems here. Each gets backed up to the same "server", to the same backup partition. Because each has a different hostname, these backups never collide.

  6. #16
    Join Date
    Sep 2009
    Location
    INDIA
    Beans
    155
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by TheFu View Post
    The hostname is already set by the running shell.

    Many people may have more that 1 computer and having their backups go to a directory for each different computer is smart. This is useful both for network backups and if the backup storage is USB plugged and unplugged into each computer as needed. I have about 20 systems here. Each gets backed up to the same "server", to the same backup partition. Because each has a different hostname, these backups never collide.
    Okay. Thanks. Let me try it again.

  7. #17
    Join Date
    Sep 2009
    Location
    INDIA
    Beans
    155
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by TheFu View Post
    The hostname is already set by the running shell.

    Many people may have more that 1 computer and having their backups go to a directory for each different computer is smart. This is useful both for network backups and if the backup storage is USB plugged and unplugged into each computer as needed. I have about 20 systems here. Each gets backed up to the same "server", to the same backup partition. Because each has a different hostname, these backups never collide.
    This time I didn't see any failure. The result is given below.

    Code:
    anupam@anupam-ubuntu:~$ sudo #!/bin/bash
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
                [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] file ...
    anupam@anupam-ubuntu:~$ sudo # ##################################
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
                [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] file ...
    anupam@anupam-ubuntu:~$ sudo # Simple /home/ backup script
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
                [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] file ...
    anupam@anupam-ubuntu:~$ # ##################################
    anupam@anupam-ubuntu:~$ sudo SOURCE="/home"
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
                [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] file ...
    anupam@anupam-ubuntu:~$ TARGET=/mnt/Backups/$HOSTNAME
    anupam@anupam-ubuntu:~$ HOWMANY="365D"
    anupam@anupam-ubuntu:~$ sudo # mounted to /mnt/Backups/
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
                [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
                prompt] [-T timeout] [-u user] file ...
    anupam@anupam-ubuntu:~$ # mounted to /mnt/Backups/
    anupam@anupam-ubuntu:~$ sudo /bin/mkdir  -p "$TARGET"
    [sudo] password for anupam: 
    Sorry, try again.
    [sudo] password for anupam: 
    anupam@anupam-ubuntu:~$ sudo /usr/bin/rdiff-backup  --exclude-special-files  "$SOURCE" "$TARGET"
    sudo: /usr/bin/rdiff-backup: command not found
    anupam@anupam-ubuntu:~$ /usr/bin/rdiff-backup  --exclude-special-files  "$SOURCE" "$TARGET"
    bash: /usr/bin/rdiff-backup: No such file or directory
    anupam@anupam-ubuntu:~$ #/usr/bin/rdiff-backup  --exclude-special-files  "$SOURCE" "$TARGET"
    anupam@anupam-ubuntu:~$
    I have unmounted the external hard disk, as suggested. What next? I think you won't mind.

  8. #18
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Backup in external hard disk

    Dude, you aren't supposed to run 1 command at a time. You are supposed to put the script into a single file, then run it by using the crontab.

  9. #19
    Join Date
    Sep 2009
    Location
    INDIA
    Beans
    155
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    Quote Originally Posted by tea for one View Post
    I would suggest that you have a look at grsync.

    It is a GUI for rsync and it may make back-ups a bit easier for you.

    Code:
    sudo apt install grsync
    I think grsync should have a system of incremental backups. I mean, I won't have to copy all the files each time of update of backups.

  10. #20
    Join Date
    May 2008
    Beans
    2,139
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Backup in external hard disk

    The first backup will take some time depending on size of data.

    Subsequent backups will be much quicker because only files that have been changed will be backed up.

    My daily backup of approx 10GB takes approx 60 - 90 seconds.

Page 2 of 3 FirstFirst 123 LastLast

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
  •