LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-11-2011, 12:39 PM   #1
Advice Pro
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 343

Rep: Reputation: 7
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
 
Old 02-11-2011, 12:47 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 02-11-2011, 12:50 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPIO backup / configuration exactiv Linux - Software 3 05-25-2009 10:51 AM
Error when attempting backup with File Backup lglrgl Linux - Software 0 08-03-2006 11:38 AM
backup configuration file for webmin via command line? paul_mat Linux - Networking 1 02-05-2006 02:54 PM
Backup XFree86 configuration C.Loko Slackware 2 10-31-2003 05:05 AM
backup and update the backup file doris Linux - General 4 08-24-2002 08:26 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration