Results 1 to 9 of 9

Thread: backup help

  1. #1
    Join Date
    Sep 2005
    Location
    Ireland
    Beans
    550
    Distro
    Kubuntu 10.04 Lucid Lynx

    backup help

    Hello,
    I wish to start making backups of my laptop in a smart way ( ie better than drag and drop into external drive ). What are the best opinions in linux for this, i have heard of backula and rsync are they good? any good guide online if i end up using a terminal program.
    I am using Kubuntu incase there is any nice KDE interface outthere.

    Thanks:
    Patrick
    Thanks:
    Using a Toshiba A300-21H ,3GB ram,Intel Core2Duo 2Ghz,Mobile Intel® GMA 4500MHD,intel wifi link 5100. Tux wants you!

  2. #2
    Join Date
    Apr 2008
    Location
    Ireland
    Beans
    270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: backup help

    Take a look at Back In Time - http://backintime.le-web.org/

    Can't say what it looks like in KDE...
    The sky above the port was the color of television, tuned to a dead channel.

  3. #3
    Join Date
    Sep 2005
    Location
    Ireland
    Beans
    550
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: backup help

    Back in time seems to more of a roll back utility. All i want is to back up Document , music and few other folders in /home each week. In such a way that i dont waste time rewriting stuff that hasnt changed. any ideas?
    Thanks:
    Using a Toshiba A300-21H ,3GB ram,Intel Core2Duo 2Ghz,Mobile Intel® GMA 4500MHD,intel wifi link 5100. Tux wants you!

  4. #4
    Join Date
    Jan 2008
    Location
    UK
    Beans
    1,783
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: backup help

    I use Grsync to a separate, removable HDD. It only backs up stuff that has changed therefore very quick. You can use the Advanced tab to exclude stuff that you don't need. I exclude these 2 hidden files like this
    Code:
    --exclude=/.gvfs --exclude=/.thumbnails
    or you could exclude all the hidden stuff like this
    Code:
    --exclude=/.*
    which is a good option if you just want to backup your viewable Documents, Music etc.

    Grsync is in Synaptic.
    Last edited by mapes12; November 8th, 2009 at 03:03 PM.
    Keep Ubuntu free! Donate any amount you like – just use the PayPal donation address donations@ubuntu.com

  5. #5
    Join Date
    Feb 2009
    Location
    Madison, WI
    Beans
    152
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: backup help

    I like rsync. I wrote the script below to back up several different things to an external USB-connected hard drive. Use "man rsync" to learn about rsync, in particular the "--delete" option, to make sure it is what you want. Use "-n" to do a dry run.

    The basic command
    Code:
    rsync -a /home/myname/dir /media/Iomega_HDD/rsyncBackups
    puts the /dir directory in the /rsyncBackups directory so that you end up with /media/Iomega_HDD/rsyncBackups/dir containing your stuff.

    In contrast, the extra / in
    Code:
    rsync -a /home/myname/dir/ /media/Iomega_HDD/rsyncBackups
    puts the contents of the /dir directory in the /rsyncBackups directory; no /dir subdirectory is created in the rysncBackups directory.

    Here is the basic script. In backing up my Ubuntu files, I don't want to backup most hidden files, but there are some .files and .directories that I do want to backup. That's why it's important to have the include options before the option to exclude all .files.

    Code:
    #! /bin/bash
    # Backup Ubuntu
    rsync -a --progress --delete \
    --log-file=/home/myname/Desktop/$(date +%Y%m%d)_rsync.log \
    --include=".gconf/" \
    --include=".gnome2/" \
    --include=".mozilla/" \
    --include=".mozilla-thunderbird/" \
    --include=".bashrc" \
    --include=".gnomerc" \
    --exclude=".*" \
    --exclude="*Cache*" \
    --exclude="softwareLinux/" \
    /home/myname /media/Iomega_HDD/rsyncBackups
    
    
    # Backup Flash Drive
    rsync -a --progress --delete \
    --log-file=/home/myname/Desktop/$(date +%Y%m%d)_rsync.log \
    --exclude="*Cache*" \
    --exclude="*.mov" \
    /media/NAME_PRSNL/Documents/namehome /media/Iomega_HDD/rsyncBackups
    
    
    # Backup Windows
    rsync -a --progress --delete \
    --log-file=/home/myname/Desktop/$(date +%Y%m%d)_rsync.log \
    --exclude="*Cache*" \
    /media/C/Users/Name/Documents /media/Iomega_HDD/rsyncBackups/C_Users_Name
    
    rsync -a --progress --delete \
    --log-file=/home/myname/Desktop/$(date +%Y%m%d)_rsync.log \
    --exclude="*Cache*" \
    /media/C/Users/Name/Downloads/downloadedDocuments /media/Iomega_HDD/rsyncBackups/C_Users_Name/Downloads
    Before running the above script, you need to create the /rsyncBackups directory. Inside that, you need to create the /C_Users_Name directory, and inside that you need to create the /Downloads directory.

  6. #6
    Join Date
    Dec 2008
    Location
    Valparaiso, Chile
    Beans
    162
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Lightbulb Re: backup help

    I've just read in a magazine about couple of programs.

    KEEP: programs your backup... so you can forget about doing it any week or so.

    YADSync: synchronizes folders (like the already suggested rsync).

    You could try them... and comment you experience.

    Regards.
    Primary: Ubuntu Maverick on Dell XPS M1330n

    Linux User 489777. Ubuntu User 27581.
    Linux Machines 401523, 401667, 401668. Get yours here and here

  7. #7
    Join Date
    Sep 2007
    Location
    Rhode Island,USA
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: backup help

    Grsync works fine for me.
    UP THE IRONS!

  8. #8
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: backup help

    Once you've got a backup script that you like, you can just drop it into the appropriate folder in /etc/cron.daily/hourly/whatever to have anacron do the backup automatically.

  9. #9
    Join Date
    Jun 2006
    Location
    USA
    Beans
    58
    Distro
    Ubuntu

    Re: backup help

    I have a rsync script in Python that is working well for me. It has 3 files the main backup.py and restformat.py used to formate my title and subtitles in the log file and backupexcluded.txt with the directories I do not what to backup.

    backup.py
    Code:
    #!/usr/bin/python
    
    import os
    from time import asctime
    import restformat
    
    #Variables
    backupruntime = asctime()
    sourcedir = "/home/coffeeboy/"
    backupdir = "/media/FreeAgent/backup/"
    incrementsdir = '/media/FreeAgent/backup-increments/' + backupruntime
    
    #Logging
    backuplog = open('/media/FreeAgent/rsync-backup.log', 'a')
    print >> backuplog, (restformat.title(backupruntime))
    print >> backuplog, ('Making increments directory: "' + incrementsdir + '"\n')
    
    #Make incrementsdir
    os.mkdir(incrementsdir)
    
    #Logging
    print >> backuplog, (restformat.subtitle('BEGIN BACKUP'))
    backuplog.close()
    
    #Run rsync backup command with Linux logging
    os.system('rsync -arEtb --delete --stats --log-file-format="%i %o %f %n" --exclude-from=/home/coffeeboy/bin/backupexcluded.txt --backup-dir=' + '"' + incrementsdir + '" ' + sourcedir + ' ' + backupdir + ' >> ' + '/media/FreeAgent/rsync-backup.log')
    
    
    #Logging
    backuplog = open('/media/FreeAgent/rsync-backup.log', 'a')
    print >> backuplog, (restformat.subtitle('END BACKUP'))
    print >> backuplog, ('\n\n')
    backuplog.close()
    enter your username for all coffeeboys and change /media/FreeAgent to you desired backup location. You will need to mkdir both an backup-increments folder and a backup folder and creat a rsync-backup.log in the backup location.


    restformat.py
    Code:
    #!/usr/bin/python
    
    def title(mytitle='reStructueredText Title'):
        'Retuns mytitle formatted as a restructeredText tilte.'
        return '======================================='+'\n'+ mytitle + '\n' + '======================================='
    
    def subtitle(mysubtitle='reStructeredText Subtitle'):
        'Returns mysubtitle formatted as a reStructeredText substring.'
        return mysubtitle + '\n' + '---------------------------------'
    This formates the title and subtitle lines used in the log file.

    The backupexcluded.txt file is a list of all visible and hidden files and folders (one per line) that I do not want to backup. [i.e. I do not backup up my .VirtualBox directory because of the size.


    An example log file output:

    =======================================
    Fri Nov 13 12:23:01 2009
    =======================================
    Making increments directory: "/media/FreeAgent/backup-increments/Fri Nov 13 12:23:01 2009"

    BEGIN BACKUP
    ---------------------------------

    Number of files: 14088
    Number of files transferred: 4
    Total file size: 9327826172 bytes
    Total transferred file size: 767443 bytes
    Literal data: 767443 bytes
    Matched data: 0 bytes
    File list size: 328252
    File list generation time: 0.003 seconds
    File list transfer time: 0.000 seconds
    Total bytes sent: 1111946
    Total bytes received: 16066

    sent 1111946 bytes received 16066 bytes 150401.60 bytes/sec
    total size is 9327826172 speedup is 8269.26
    END BACKUP
    ---------------------------------
    Time is moving forward, but is our understanding following?

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
  •