Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been trying to backup my home directory files using tar, from the terminal but keep chasing my tail. The problem is not with the tar command/flags but trying to write to the DVD RW. I'm sure there must be hundreds of simple bash scripts or Perl scripts for something so basic. Any ideas? Thanks in advance, Matthew
These are the files extracted and placed in /dvd_backup directory:
backup.conf.sample, backup.sh, ChangeLog, Makefile, VERSION
I'm not quite sure of how to proceed. This doesn't look like the typical 3-step dance, not that I've had many of those. The Changelog and VERSION are easy. The sample conf.file has a few #comments that are opaque for me. What directories, files etc. are usually backed up? Will this back up my .jpg files as well as my regular files? I appreciate any help.
Matthew
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Never tried it till now but works quite well so far. Very simple. Don't like the idea of password set as plain text in the config but if you are the only one that can see and open the file then should not be a big deal.
If the true point of the files extracted is set to /dvd_backup then you can use the command as follows.
cd into /dvd_backup
mv /dvd_backup/dvd_backup.conf.sample /dvd_backup/dvd_backup.conf ( This lines renames the config file.)
./dvd_backup --config /dvd_backup/dvd_backup.conf --init
Now this will backup the contents from /etc and /home and using growifs command send the data to /dev/cdrom. This based on the default values for the BACKUP_PATHS set in the dvd_backup.conf file. Pretty basic config file overall. Same as applies to other info like the BACKUP_DEVICE and others. Edit the config file to backup what you want and to which device. You can even exclude certain files and extensions of files.
Never tried it till now but works quite well so far. Very simple. Don't like the idea of password set as plain text in the config but if you are the only one that can see and open the file then should not be a big deal.
If the true point of the files extracted is set to /dvd_backup then you can use the command as follows.
cd into /dvd_backup
mv /dvd_backup/dvd_backup.conf.sample /dvd_backup/dvd_backup.conf ( This lines renames the config file.)
./dvd_backup --config /dvd_backup/dvd_backup.conf --init
Now this will backup the contents from /etc and /home and using growifs command send the data to /dev/cdrom. This based on the default values for the BACKUP_PATHS set in the dvd_backup.conf file. Pretty basic config file overall. Same as applies to other info like the BACKUP_DEVICE and others. Edit the config file to backup what you want and to which device. You can even exclude certain files and extensions of files.
Brian
Arrgh! I think I'm so close, yet typing these commands into Unix can eat up hours trying to get it straight.
This is copied from my shell:
mathay@linux:~> ./dvd_backup --config /dvd_backup/dvd_backup.conf --init
bash: ./dvd_backup: is a directory
mathay@linux:~> cd dvd_backup
mathay@linux:~/dvd_backup> ./dvd_backup --config /dvd_backup/dvd_backup.conf --init
bash: ./dvd_backup: No such file or directory
mathay@linux:~/dvd_backup> ls
backup.conf.sample backup-sample backup.sh ChangeLog dvd_backup.conf Makefile VERSION
mathay@linux:~/dvd_backup>
Can you spot my error?
Matthew
You can let growisofs determine a burn speed, or you can specify one manually. e.g., add -speed=2 to the command line to set the burn speed. If you want to just see if your command looks good, without actually burning, add -dry-run to the command line.
Note: growisofs is part of the dvd+rw-tools package. You may need to install that first, if the growisofs command is not present on your system. Also, if you need to format a DVD before use, this same package includes a command dwd+rw-format for that purpose. dvd+rw-mediainfo is another command from this package that tells you info about a DVD you have inserted in your drive.
[edit]
Fixed a typo in that second growisofs example above. I originally mistyped a "-X" command line option, that should have been "-Z".
[/edit]
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
I see you don't have the script called dvd_backup.sh. Just backup.sh. Need to change the command to this. Why you have adifferent name I am not sure. You may have downloaded and the other one on the page.
I see you don't have the script called dvd_backup.sh. Just backup.sh. Need to change the command to this. Why you have adifferent name I am not sure. You may have downloaded and the other one on the page.
Many thanks Brian. Your suggestion makes sense to me and I'm sure it would work. In the meantime, I tried the growisofs solution and it is extremely easy and fast and preserves the entire directory structure.
Matthew
You can let growisofs determine a burn speed, or you can specify one manually. e.g., add -speed=2 to the command line to set the burn speed. If you want to just see if your command looks good, without actually burning, add -dry-run to the command line.
Note: growisofs is part of the dvd+rw-tools package. You may need to install that first, if the growisofs command is not present on your system. Also, if you need to format a DVD before use, this same package includes a command dwd+rw-format for that purpose. dvd+rw-mediainfo is another command from this package that tells you info about a DVD you have inserted in your drive.
Wow! It actually worked! I spent a couple of hours trying to find out how Suse labels/mounts cd-dvd's. No wonder I get confused. Suse refers to the dvd as hdc and sometimes located in / (media) in other places as
/:media and also as dev/dvd. What I finally had to do was locate where the dvd was mounted. I found a directory called /media, cd'd to there and tried your command :
mathay@linux:/media> dvd+rw-mediainfo /dev/dvd
I got an answer and immediately tried the backup formula and it burned a disk with /home & everything on it.
I want to offer my heartfelt thanks. I know just enough about linux to be dangerous. I've managed to crash and burn once and lost all my data; a 2nd time, a brand new disk developed 'Bad Blocks' and they were located in the Journaling section....I lost all my data again.
I know that everyone has different goals, but would you recommend backing up anything else besides /home?
Finally, I have no particular skills (that I know of) that might be useful to the linux community (I'm reasonably fluent in German but so many Germans are very fluent in English, so that's not in demand) and I dislike 'taking all the time' and not contributing. I tried to donate small money sums several times but can't understand the mechanism/program for doing so and had to bail out. Suggestions?
Matthew
Yes, my DVD is /dev/hdc also. That's because I have a harddisk know as /dev/hda and a second harddisk known as /dev/hdb. So my next ide device is /dev/hdc, and that is my dvd drive.
On my system, you can see that /dev/hdc can be accessed different ways. /dev/dvd is the same thing. So is /dev/cdrom. And /dev/dvdrw and /dev/cdrw. These are all symlinks to /dev/hdc.
The above are devices. When a CD or DVD is inserted and automatically mounted, my system's default mountpoint is /media/cdrom0. A symlink points /media/cdrom to /media/cdrom0, so I can reference either one. This default mountpoint may vary from distro to distro. Remember, a "device" is mounted to a "mountpoint". /dev contains devices. /media contains mountpoints on my distro (and evidently, on yours as well).
Once again, I am indebted.
I've been trying to solve this problem on my own for at least 6 Mos. There are many ways to BkUp. But, this one is the slickest and most complete.
Matthew
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.