Skip to Content

如何备份(How to make a backup)

sasaqqdan 的头像
How to make a backup

请查看puppy3.01使用手册中的 如何做备份

a starter at filling in the stub

First, what do we wish to back up and what can be safely ignored?


In most cases, one would want to back up user files. These are likely to be in /root or /root/spot. In my case, on my USB sticks, I also have files in /mnt/home (so they are also accessable by computers that I plug the USB stick into outside of Puppy).

The remainder of the file system holds the Puppy distribution (e.g. in /bin, /usr/bin, ...). There is little to be lost in these areas because they are all recoverable from the CD. And you will overtake these with the next release of Puppy anyway. A possible exception is /usr/local/bin (and ~/my-applications for Puppy) which is the traditional place that executable files external to the operating system distribution are stored. But even these are usually recoverable by use of the distribution CDs or another download, so there's little percentage in backing them up either.

The remaining place to worry about is files that control various settings. Some of these are dot files (e.g. .bashrc) in your home directory (/root in the case of Puppy) and files in /etc. In practice, few of these files are so valuable that they cannot be readily recreated -- aggravation perhaps, but usually no serious loss.

Therefore we can confine the areas to worry about backups to those in the first paragraph: the user files.



In unix, there is never just one way to do something. The list of alternatives is indefinitely long. But here are just two ways to do effective backups of your user files:

Open a gftp connection between your Puppy installation and some other computer. Use ssh (the tab in gftp says ssh2) and it should work 'out of the box' with just about any operating system except Windows (which does not natively support ssh). Simply transfer the entire /root/spot/* or /mnt/home/* directories to the archive machine.

Puppy also has rsync capability. There is, as of this writing, GRsync available for download that puts both a memory and a GUI front end onto rsync (so you can repeat the script next week without having to recreate the singularly unmemorable syntax). rsync also runs over ssh. rsync has an advantage over gftp in that it only updates files that have been changed. So if you backed up 101 files last week and since edited three of them, this week's backup will only update the three that you edited and leave the rest undisturbed in the archive. rsync is also easy to wrap into a cron script so it is done automatically at 0300 every Tuesday morning.

(accept this as an outline to get started -- I don't have good example syntax to plug in -- leave that for others).
#3195
关于LINUX的备份,我觉得有个讲得更透彻、详细的地方,请参考:
Linux备份策略
#8741
fff80 的头像
首先,我们要备份什么,什么备份要忽略?


在大多数情况下,一定要备份用户文件。 这很可能是在/ root或 /root/spot。 就我而言,我的U盘,我也有在/mnt/home的文件(所以他们也由电脑,我插入小狗U盘以外的访问)。

该文件系统的其余部分保存小狗分布(e.g. in /bin, /usr/bin, ...). 有一点要在这些领域丢失,因为它们都是从CD收回。 你会超越与未来释放这些小狗反正。 一个可能的例外是/usr/local/bin 目录(和~/my-applications for Puppy),这是通常的位置,可执行文件外部的操作系统分配的存储位置。 但即使是这些,都是由分布CD或下载使用通常另一收回,所以在支持他们,无论是小的比例。

其余的地方,担心的是文件,控制各种设置。 这些都是一些点文件(比如。bashrc中)在您的家目录(在puppy系统的/root目录),并在/etc等。在实际情况下,这些文件很少有这样重要,他们不能轻易重建 - 损坏,但一般也不会造成严重损失。

因此,我们可以集中的位置,有关备份担心在第一款的:用户的文件。


在UNIX中,从来就没有只有一个办法做一些事情。 替代品的无限长的名单。 但是,这里提供了两种方法来实现你的用户文件的有效备份:

打开你的小狗之间安装的gftp和一些其他计算机连接。 使用ssh(在说的gftp SSH2的标签),它应与Windows操作系统以外的任何公正的开源系统有关(这本身并不支持SSH)。 简单地转移整个/root/现货/root/spot/* or /mnt/home/*目录到存档机。

小狗也有rsync的能力。 还有就是,作为这个写作,GRsync下载这使得双方的内存和一个GUI前端上的rsync可用(所以你可以重复,而无需重新创建脚本的语法奇unmemorable下周)。 rsync的也运行在ssh。 rsync的拥有,因为它的gftp只更新文件已被更改的优势。 所以,如果你备份以来修改的文件,其中三个101上周,本周的备份将只更新您所编辑的三个,其余留在档案中不受干扰。 rsync是也容易包装成一个cron脚本,它是在0300自动完成每个星期二早上。

(接受此大纲开始 - 我没有很好的例子语法堵塞 - 留给别人)。

发表新评论

  • 你可以在文本中使用BBCode标记语言。 URL会自动被转为链接。

更多关於格式化选项的信息

CAPTCHA
请验证您是否是机器人。
Image CAPTCHA
Enter the characters shown in the image.