FANDOM


These instructions are fairly pedantic as I use them for setting up my own automated backup system. It should be a generally useful reference though if you're setting up automated backups or an nfs mount.

I use Services for Unix on Windows as the NFS server on which to store backups. It should be fairly straightforward to use any other NFS server.

Automated BackupEdit

  1. Set up Services for Unix on a Windows server and include the related components such as user name mapping.
  2. Upload the passwd and group files to the server and reference them as the files to use for user name mapping.
  3. In the SFU user interface, set up a map between root and a local user, for example IUSR_[MachineName]. (This particular example will also enable the locally installed web server to access content shared via nfs, so you may prefer to just create a new user specifically for nfs instead.)
  4. Disable "simple maps" on the "user name mapping" screen. This will prevent standard user accounts on the NetBSD box from having implicit access to nfs shared content.
  5. Create a client group AtariGroup in which the Atari client machine is a member.
  6. Right-click Server for NFS to stop and restart the server.
  7. Right-click User Name Mapping to stop and restart the user name mapping service.
  8. Right-click the directory you want to share in the shell and go to the NFS Sharing tab.
  9. Select to share the folder and give it a name.
  10. Disable anonymous access.
  11. Click Permissions.
  12. Disable ALL MACHINES access and root access for ALL MACHINES.
  13. Add the AtariGroup into the NFS share permissions and set access to Read-Write with root access allowed.
  14. In the Security tab, add IUSR_[MachineName] or whatever mapped user use used for the NFS permissions previously.
  15. You may want to remove acces to other groups that this account could be a member of, ex: Users.
  16. The advanced permissions for IUSR_[MachineName] can be set to allow this user only the following permissions:
    1. Traverse Folder / Execute File
    2. Read Attributes
    3. Create Files / Write Data
    4. Create Folders / Append Data
    5. Write Attributes
  17. This will restrict directory listing, even for the root user. Read permissions (for restore) will automatically be granted to the created backup files.
  18. Back on the atari, su to root.
  19. You should be able to see the share with showmount -e [MachineName]
  20. mkdir /AtariBackup
  21. chmod 200 /AtariBackup
  22. mount_nfs -w 65536 [MachineName]:/AtariBackup /AtariBackup
    • Some testing in my own configuration revealed that the -w option specified above gave better transfer rates over 10 megabit ethernet than the default setting. The same value for -r caused the NFS client to lock up, so I'd advise against modifying the -r option.
  23. Now you should be able to copy files to /AtariBackup and see them on the server machine. You shouldn't be able to see a directory listing as root, but you should be able to read the files back if you reference them directly. You shouldn't be able to view /AtariBackup at all as non-root.
  24. To try a full dump manually, do:
  25. Set up a decent backup script. This example uses one from the nixCraft shell script collection, provided here.
  26. Copy the script to ~root/tapebackup.sh
  27. chmod 700 tapebackup.sh
  28. mkdir /var/log/dumps
  29. chmod 700 /var/log/dumps
  30. Edit tapebackup.sh, changing:
    • FSL = "/"
      • This will set the whole root filesystem for backup.
    • TAPE = "/AtariBackup/backup.`date +'%Y%m%d%H%M%S'`"
    • opts = "-${level}uantX -f ${tape}"
  31. Save and exit the editor.
  32. crontab -e
  33. Add the following line:
    • @midnight /root/tapebackup.sh
  34. Save and exit the editor.
  35. Edit /etc/fstab and add the following to auto-mount the nfs share:
    • [MachineName]:/AtariBackup /AtariBackup nfs rw,-w=65536
    • (use tab instead of spaces above)
  36. Save and exit the editor.
  37. shutdown -r now
  38. Now the system will perform a backup each night. On Monday (Sunday night) it will do a full backup, with subsequent backups in that week being incremental.

RestoreEdit

  1. To restore individual files:
    • cd /
      • If you don't do this, the full extracted directory structure will appear under your current directory.
    • restore -i -f /AtariBackup/backup.[date]
    • If backup is set up as described above, the last full backup will be on Monday (Sunday night). Incremental backups throughout the week will contain any changes that happened since the previous backup. When restoring, the restore program only operates on the particular file referenced in the command line, not the whole stack of backups created since the last full backup.
  2. Use the commands describe in the restore man page to restore files in interactive mode. Generally speaking, this would be something like:
    • cd / ls to examine the backup.
    • add [filename]
    • extract
    • 1
    • quit
  3. Other restore options can be used to restore the entire filesystem, etc.


NotesEdit

  • Once I have an iSCSI target set up I'd like to revisit this to see if there are any benefits to using the iSCSI initiator rather than NFS.
  • In general, one benefit of switching to a SCSI <--> iSCSI bridge instead of a physical drive is that disk image snapshots may be taken without a long backup process running on the Atari. Once a reasonably priced SCSI <--> iSCSI bridge becomes available this is definitely something to look into further.
  • Chapter 29 of the NetBSD Guide is a helpful reference regarding NFS.
  • FreeBSD Handbook Chapter 18.12: Backup Basics is also useful.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.