如何备份(How to make a backup)

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).