Before making changes to the system, a good practice would be saving the old
One thing I've learned to do is to copy a text file to a file with the extension
".bak" before I edit it.
My FreeBSD system provides me with a command named "dump" to back up files,
and with "restore" to restore from the dump.
I have decided to use a cron job to back up my files; the command now is
/sbin/dump -9 -a -f /media/bsdBackup/backups/backupfile /
The reason I use the -a (autosize) flag is that I don't want the process
interactive; without that flag the process will prompt me for volumes.
Dropping it is good when saving to a tape. Yes, Dump support tape backups, and
the file name for a tape drive is "/dev/sa0", the tape drive is the default
output file. To specify another, I use flag -f followed by a file name.
I get the following warning at the beginning:
DUMP: WARNING: should use -L when dumping live read-write filesystems!
OK, Let's see what will happen if I try to use the flag "-L" as follows:
/sbin/dump -L -9 -a -f /dev/null /
This time, I get the following error (not for trying to save a backup to
mksnap_ffs: Cannot create snapshot //.snap/dump_snapshot: /: Snapshots are not
yet supported when running with journaled soft updates: Operation not supported
dump: Cannot create //.snap/dump_snapshot: No such file or directory
I've found in the FreeBSD forum is that the way to disable the soft update
journaling is to boot in _single user_ mode and then run the commend:
tunefs -j disable /
where '/' is the file system I want to backup. This means that maybe running the
backup from a _cron job_ is not a good idea. Anyway, after exiting _Single user_
job and deleting "/.sujournal", the backup works fine.
Then, I return to _single user_ mode to enable soft update journaling, which
will help the file system recover after a power failure.
BTW, I prefer working in _single user_ mode when the USB mouse is not plugged,
so I will not get notified about the mouse all the time.