个人工具

“UbuntuHelp:BackupYourSystem/SimpleBackupSuite”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite}}
 
{{From|https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite}}
 
{{Languages|UbuntuHelp:BackupYourSystem/SimpleBackupSuite}}
 
{{Languages|UbuntuHelp:BackupYourSystem/SimpleBackupSuite}}
This guide is part of the BackupYourSystem Page. It is separate for the sake of organization.  
+
This guide is part of the [[UbuntuHelp:BackupYourSystem|BackupYourSystem]] Page. It is separate for the sake of organization.  
 
== Introduction ==
 
== Introduction ==
 
Data can be lost in many different ways.  Sometimes it is lost because of hardware failures, accidental deletion, or overwriting files. Some data loss occurs as a result of natural disasters and other circumstances beyond your control.
 
Data can be lost in many different ways.  Sometimes it is lost because of hardware failures, accidental deletion, or overwriting files. Some data loss occurs as a result of natural disasters and other circumstances beyond your control.

2008年10月19日 (日) 11:05的版本

This guide is part of the BackupYourSystem Page. It is separate for the sake of organization.

Introduction

Data can be lost in many different ways. Sometimes it is lost because of hardware failures, accidental deletion, or overwriting files. Some data loss occurs as a result of natural disasters and other circumstances beyond your control. Now we will use an easy backup and restore tool called Simple Backup Suite, or sbackup for short. SBackup is a simple backup solution intended for desktop use. It can backup any subset of files and directories. Exclusions can be defined by regular expressions. A maximum individual file size limit can be defined. Backups may be saved to any local and remote directories that are supported by gnome-vfs. There is a Gnome GUI interface for configuration and restore. SBackup uses compressed archives, so it is not the best backup solution if you are primarily backing up large amounts of multimedia like videos, photographs, or music. These data types are already compressed, so you will spend lots and lots of time compressing these files with gzip with little or no space being saved.

Installation

To install sbackup, you need to install the sbackup package from the Universe Repository. You can use Synaptic, or install from terminal:

sudo apt-get install sbackup

Backing Up Your Data

Once you have completed the installation you can access sbackup using System -> Administration —> Simple Backup Config, you can see this in the following screen {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=1.png%7D%7D <
> The next screen is asking for your user password. Enter your user password and click ok. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=2.png%7D%7D <
> Once it opens the sbackup application you can see the following screen where you can configure your backup settings. The first tab is general options. In this example I am choosing Use custom backup settings. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=3.png%7D%7D <
> Sbackup can be operated in 3 different modes

Recommended Backup

If you are new Ubuntu user or are not sure what you should backup. This will perform a daily backup of your /home, system data held in /etc, /usr/local and /var. This will deliberately exclude any files over 100MB. By default this backup will be stored in /var/backup.

Custom Backup

This is the same as the recommended backup and in this you can change the settings include, exclude files, you can change the schedule time. With this option you will be able to specify where to save the backup file.

Manual Backup

If you want to backup some files from time to time this option is for you. You can click backup now button to manually perform a backup according to the settings on the other backup properties dialog box tabs. With this option you will be able to specify where to save the backup file. For the rest of the guide, it will be assumed that you chose the custom backup or the manual backup option. If you chose the recommended backup, you will not be able to customize any settings. Next, click on the Include tab. Here you can include any file or directory you want to backup. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=4.png%7D%7D <
> If you click on the Add file button you should see the following screen where you can select your files. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=5.png%7D%7D <
> If you click on the Add Directory button you should see the following screen where you can select your directory for backup. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=6.png%7D%7D <
> The next option is Exclude. Here you can exclude files and folders you do not want to backup.You can exclude Paths, File Types, Regular Expressions, Max file, folder size. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=7.png%7D%7D <
> The next option is Destination. Here I am leaving the default location, i.e /var/backup If you want to change the backup store location you can select Use Custom local Backup directory and enter the location. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=8.png%7D%7D <
> Now you can select the Time option. Here you can schedule when you want to run your backup. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=9.png%7D%7D <
> Available options for backups you can see in the following screen are: hourly, daily, weekly, monthly, and custom options. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=10.png%7D%7D <
> The next option is Purging. Here you can select old and incomplete backups and set the number of days you want to purge after completing. All the settings you change require you to click on the Save button to save your settings. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=11.png%7D%7D <
> Now if you want to take backup just click on Backup Now or leave the schedule backup in this example. I just clicked on Backup Now, this started a background process with process id you can see this in the following screen. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=12.png%7D%7D

Restore Your Data

If you want to restore backups or any files or folders go to System —> Administration —> Simple Backup Restore, as shown in the following screen. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=13.png%7D%7D <
> Once it opens you should see the following screen. Here you can select the restore source folder and available backups from drop-down menu. Choose the files and folders you want to restore and click on the Restore button. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=14.png%7D%7D <
> In this example I have choose to restore one .iso file and once you select your file and click on Restore it will ask for your confirmation. Click on yes, this will restore the file in its original location. If you want to restore in a different location you need to select the Restore As option. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=15.png%7D%7D <
> Note: By default, Restored Files and Directories are owned by root This is because sbackup runs with root priveleges. You need to change these file or folder permissions using chmod, or just right click and select properties of the file or folder.

Backup Destination on Remote machine

One more nice thing about sbackup is that you can store your backup on a remote machine. For this it will give the option of using SSH or FTP. For this go to System —> Administration —> Simple Backup Config Once it opens the application you need to click on destination tab. Here you can select the Use a remote Directory option, type ssh:// or ftp:// followed by the username:password, then @, then the remote host to connect to and the remote directory. {{https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite?action=AttachFile&do=get&target=16.png%7D%7D <
> Final Tip: Sbackup does not create a new backup file each time it runs, instead it creates an incremental backup. This means that it updates the last backup with files which have been modified or created. Any files that have not been modified since the last backup are unchanged.

Sbackup Configuration from the command line

If you want to configure sbackup you need to edit the /etc/sbackup.conf file. Restore Backup from command line Run

sudo srestore.py /var/backup/2006-11-18_03 /home/myuser /home/myuser/old

You can omit the last parameter to restore to the same directory.

Automatically backup at shutdown

In case you want to shutdown your workstation when you're done and not have to backup manually every now-and-then, you might find it useful to have simple-backup being run every time you log off. To enable this, you need to do only a few things:

  1. save this page UbuntuHelp:sbackupd to `?action=AttachFile&do=get&target=etc%2Finitd%2F%60
  2. set file ownership to `root:root` and file permissions to: `rwx-r-xr-x`
  3. execute the following from a terminal:
    sudo update-rc.d sbackupd start 00 0 1 6 .
    
    which will effectively run the downloaded script every time Ubuntu comes into single-user-mode, shutdown or reboot. Since the script will only run `sbackupd`, this effectively gives you a backup every time you shutdown or reboot your machine.

I find it useful to use both a schedule and this 'at-shutdown' script because i get a backup at least once a day, and i needn't care about keeping my machine powered on.

If you find this overkill, you can revert to manual by executing
sudo update-rc.d -f sbackupd remove