Results 1 to 6 of 6

Thread: Quick backup of single file

  1. #1
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Quick backup of single file

    I want to install grub2, but firs I want to make a backup of my menu.lst file. In a lot of tutorials on different topics, there was terminal command which copied the file you were going to work with under a new name, as a backup.
    Lets say you want to work with menu.lst, then you created something like menu_bkp.lst in the same location.
    Until now I never did that, and I cant find any of those old tutorials I saw it in.
    Anybody has an idea what am talking about and could tell me the command?

    Thanks in advance.

  2. #2
    Join Date
    Dec 2007
    Location
    Science Station Hermes
    Beans
    611
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Quick backup of single file

    Don't know about any special commands, but
    Code:
    cp file file.bak
    has never let me down. In the case of menu.lst you will need to use sudo if you are going to copy it to the same directory. Though you might want to copy the file to your home directory, shouldn't need sudo for that:
    Code:
    cp /boot/grub/menu.lst ~
    Quote Originally Posted by Legendary_Bibo View Post
    I tried, and by tried I mean I did a half a**ed google search, and by half a**ed google search I mean I typed "eread pdg"

  3. #3
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Quick backup of single file

    Thats it! Thank you! If I put it in my home directory it works, but as soon as I try to put it in the same folder with

    Code:
    sudo cp /boot/grub/menu.lst boot/grub/menu.list.bak
    I get

    Code:
    cp: cannot create regular file `boot/menu/menu.lst.bak': No such file or directory
    What does that mean?

  4. #4
    Join Date
    Oct 2009
    Beans
    2

    Re: Quick backup of single file

    Quote Originally Posted by Zilioum View Post
    Code:
    sudo cp /boot/grub/menu.lst boot/grub/menu.list.bak
    I get

    Code:
    cp: cannot create regular file `boot/menu/menu.lst.bak': No such file or directory
    What does that mean?
    It means you are missing grub from the destination path.

  5. #5
    Join Date
    Dec 2007
    Location
    Science Station Hermes
    Beans
    611
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Quick backup of single file

    Quote Originally Posted by Zilioum View Post
    Thats it! Thank you! If I put it in my home directory it works, but as soon as I try to put it in the same folder with

    Code:
    sudo cp /boot/grub/menu.lst boot/grub/menu.list.bak
    I get

    Code:
    cp: cannot create regular file `boot/menu/menu.lst.bak': No such file or directory
    What does that mean?
    You left out the leading /:

    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/menu.list.bak
    Quote Originally Posted by Legendary_Bibo View Post
    I tried, and by tried I mean I did a half a**ed google search, and by half a**ed google search I mean I typed "eread pdg"

  6. #6
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Quick backup of single file

    I found the mistake. It has to be:
    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
    Now it works, thanks for the help.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •