LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help me backup a configuration file? (https://www.linuxquestions.org/questions/linux-newbie-8/help-me-backup-a-configuration-file-862080/)

LAPIII 02-11-2011 11:39 AM

Help me backup a configuration file?
 
I've read:

It's always a good idea to backup a configuration file like sources.list before you edit it. To do so, issue the following command: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup


Where does it backup to and how do I access it? I want to put the backup on removable disk or upload it

macemoneta 02-11-2011 11:47 AM

The format of the cp (copy) command is:

cp <source> <destination>

So in your example, you are copying the file '/etc/apt/sources.list' to the file '/etc/apt/sources.list.backup'.

Your backup is in '/etc/apt/sources.list.backup', which you can copy elsewhere if you like.

repo 02-11-2011 11:50 AM

Quote:

cp /etc/apt/sources.list /etc/apt/sources.list.backup
It's backup to the
Code:

/etc/apt/
directory
To make a backup to a removable disk,
mount the disk and use
Code:

cp /etc/apt/sources.list /PATH/TO/THE/DISK/sources.list.backup
To upload the file, point your ftp to the
Code:

/etc/apt
directory, or where ever you stored the file

Kind regards


All times are GMT -5. The time now is 03:05 AM.