Discussion:
[j-nsp] How to take Backup of Configuration file using FTP
Transworld Associates
2006-10-27 14:23:59 UTC
Permalink
Dear ALL !

Please guide me, I need to take backup of my configuration file through FTP

Regards !
Erdem Sener
2006-10-27 14:40:31 UTC
Permalink
Hi,

You have two options:

1) You can build a script on a server that connects to the box via FTP
and 'downloads' the configuration file every n time using crontab.
This user should at least have 'maintenance' privileges to download
the configuration:

class backup-dudes {
permissions maintenance;

user backup-user {
uid xxx;
class backup-dudes;

2) You can have the router store a copy on the configuration file on
each commit or every x minutes to a remote FTP server:

user at host# show system archival
configuration {
transfer-on-commit;
archive-sites {
"ftp://test:test123 at ftp.somehost.com";
}
}
For more options:

user at host# set system archival configuration ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these groups
archive-sites
transfer-interval Frequency at which file transfer happens
(15..2880 minutes)
transfer-on-commit Transfer after each commit


HTH
--
Erdem
Dear ALL !
Please guide me, I need to take backup of my configuration file through FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Transworld Associates
2006-10-27 14:58:13 UTC
Permalink
Thank You Very Much for the help !
Hello,
Is this a one time thing or are you trying to get it
to automate regular backups? If this is a one time
effort, simply make use of the operational mode ftp
client to copy the current configuration file over as
lab at HongKong> file list /config
juniper.conf.1.gz
juniper.conf.2.gz
juniper.conf.3.gz
juniper.conf.gz
lab at HongKong> ftp 10.210.8.2
Connected to 10.210.8.2.
220 Tokyo FTP server (Version 6.00LS) ready.
Name (10.210.8.2:lab): lab
331 Password required for lab.
230 User lab logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I.
ftp> lcd /config
Local directory now /config
ftp> cd /var/tmp
250 CWD command successful.
ftp> put juniper.conf.gz
local: juniper.conf.gz remote: juniper.conf.gz
200 PORT command successful.
150 Opening BINARY mode data connection for
'juniper.conf.gz'.
100% 1221 00:00 ETA
226 Transfer complete.
1221 bytes sent in 0.00 seconds (1.07 MB/s)
ftp> cd /var/tmp
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 6
srw-rw---- 1 root operator 0 Oct 21 17:16
.pccardd
-rw-r--r-- 1 lab wheel 1221 Oct 27 07:43
juniper.conf.gz
-rw-r----- 1 root wheel 178 Oct 21 17:26
sampled.pkts
226 Transfer complete.
ftp>
OR, if your trying to perform regular backups you will
lab at HongKong> configure
Entering configuration mode
[edit]
lab at HongKong# edit system archival
[edit system archival]
lab at HongKong# set ?
+ apply-groups Groups from which to inherit
configuration data
+ apply-groups-except Don't inherit configuration
data from these groups
configuration Automatic configuration uploads
to host(s)
[edit system archival]
lab at HongKong# set configuration ?
+ apply-groups Groups from which to inherit
configuration data
+ apply-groups-except Don't inherit configuration
data from these groups
archive-sites
transfer-interval Frequency at which file
transfer happens (minutes)
transfer-on-commit Transfer after each commit
[edit system archival]
lab at HongKong# set configuration
HTHs..
Jared
--- Transworld Associates <juniper.m320 at gmail.com>
Dear ALL !
Please guide me, I need to take backup of my
configuration file through FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Christian Koch
2006-10-27 14:44:03 UTC
Permalink
Hi,

I suggest doing a continuous backup of the config which would take place
after each commit


You can do this by

(Edit system archival configuration)
Transfer on interval
transfer-on-commit;
archive-sites ftp://user:password at ftpsite.net-or-ip:port/path



If you just want to backup the config one time here is the file
structure, than you can just ftp your server and copy the files over

/config (flash)
* juniper.conf, juniper.conf.1, juniper.conf.2, and
juniper.conf.3
! /var (disk)
* /var/home - users' home directories
* /var/db/config - juniper.conf.4 through juniper.conf.9
* /var/log - Contains system log and tracing files
* /var/tmp-core files, temp directory for new software
! /altroot (disk)
* request system snapshot command
* the root file system (/) is backed up to /altroot
! /altconfig (disk)
* request system snapshot command
* /config directory is backed up to /altconfig.


-----Original Message-----
From: juniper-nsp-bounces at puck.nether.net
[mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Transworld
Associates
Sent: Friday, October 27, 2006 10:24 AM
To: juniper-nsp at puck.nether.net
Subject: [j-nsp] How to take Backup of Configuration file using FTP

Dear ALL !

Please guide me, I need to take backup of my configuration file through
FTP

Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Leigh Porter
2006-10-27 15:26:05 UTC
Permalink
This is what I do, it's nice.

Anybody know if the other people can do this?

--
Leigh
Post by Christian Koch
Hi,
I suggest doing a continuous backup of the config which would take place
after each commit
You can do this by
(Edit system archival configuration)
Transfer on interval
transfer-on-commit;
archive-sites ftp://user:password at ftpsite.net-or-ip:port/path
If you just want to backup the config one time here is the file
structure, than you can just ftp your server and copy the files over
/config (flash)
* juniper.conf, juniper.conf.1, juniper.conf.2, and
juniper.conf.3
! /var (disk)
* /var/home - users' home directories
* /var/db/config - juniper.conf.4 through juniper.conf.9
* /var/log - Contains system log and tracing files
* /var/tmp-core files, temp directory for new software
! /altroot (disk)
* request system snapshot command
* the root file system (/) is backed up to /altroot
! /altconfig (disk)
* request system snapshot command
* /config directory is backed up to /altconfig.
-----Original Message-----
From: juniper-nsp-bounces at puck.nether.net
[mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Transworld
Associates
Sent: Friday, October 27, 2006 10:24 AM
To: juniper-nsp at puck.nether.net
Subject: [j-nsp] How to take Backup of Configuration file using FTP
Dear ALL !
Please guide me, I need to take backup of my configuration file through
FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Ebben Aries
2006-10-27 14:35:05 UTC
Permalink
If you want this initiated within JUNOS, you have the ability to transfer on
timed intervals or on every commit

eg.

system {
archival {
configuration {
transfer-on-commit;
archive-sites {
"ftp://username:password at 10.0.0.1/configs/";
}
}
}
}


---

Ebben
Post by Transworld Associates
Dear ALL !
Please guide me, I need to take backup of my configuration file through FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Jared Gull
2006-10-27 14:49:23 UTC
Permalink
Hello,

Is this a one time thing or are you trying to get it
to automate regular backups? If this is a one time
effort, simply make use of the operational mode ftp
client to copy the current configuration file over as
shown below:

lab at HongKong> file list /config

/config:
juniper.conf.1.gz
juniper.conf.2.gz
juniper.conf.3.gz
juniper.conf.gz

lab at HongKong> ftp 10.210.8.2
Connected to 10.210.8.2.
220 Tokyo FTP server (Version 6.00LS) ready.
Name (10.210.8.2:lab): lab
331 Password required for lab.
Password:
230 User lab logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I.
ftp> lcd /config
Local directory now /config
ftp> cd /var/tmp
250 CWD command successful.
ftp> put juniper.conf.gz
local: juniper.conf.gz remote: juniper.conf.gz
200 PORT command successful.
150 Opening BINARY mode data connection for
'juniper.conf.gz'.
100% 1221 00:00 ETA
226 Transfer complete.
1221 bytes sent in 0.00 seconds (1.07 MB/s)
ftp> cd /var/tmp
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 6
srw-rw---- 1 root operator 0 Oct 21 17:16
.pccardd
-rw-r--r-- 1 lab wheel 1221 Oct 27 07:43
juniper.conf.gz
-rw-r----- 1 root wheel 178 Oct 21 17:26
sampled.pkts
226 Transfer complete.
ftp>

OR, if your trying to perform regular backups you will
want to configure configuration archival:

lab at HongKong> configure
Entering configuration mode

[edit]
lab at HongKong# edit system archival

[edit system archival]
lab at HongKong# set ?
Possible completions:
+ apply-groups Groups from which to inherit
configuration data
+ apply-groups-except Don't inherit configuration
data from these groups
configuration Automatic configuration uploads
to host(s)
[edit system archival]
lab at HongKong# set configuration ?
Possible completions:
+ apply-groups Groups from which to inherit
configuration data
+ apply-groups-except Don't inherit configuration
data from these groups
archive-sites
transfer-interval Frequency at which file
transfer happens (minutes)
transfer-on-commit Transfer after each commit
[edit system archival]
lab at HongKong# set configuration

HTHs..

Jared


--- Transworld Associates <juniper.m320 at gmail.com>
Dear ALL !
Please guide me, I need to take backup of my
configuration file through FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Sinan İlkiz
2006-10-30 07:27:09 UTC
Permalink
If you prefer the first option that Erdem suggested and dont want to deal with compressed configs, you can use the following knob to force JunOS to save configs as clear text. But i dont think it is a good practice.

[edit system]
sinani at Maslak-M7i# set ?
...
no-compress-configuration-files Don't compress the router configuration files
...

I personnally prefer backing up configs via a UNIX box every night, because sometimes our operators tend to commit too often when troubleshooting a customer problem.

Regards.


-----Original Message-----
From: juniper-nsp-bounces at puck.nether.net [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Erdem Sener
Sent: 27 Ekim 2006 Cuma 17:41
To: Transworld Associates
Cc: juniper-nsp at puck.nether.net
Subject: Re: [j-nsp] How to take Backup of Configuration file using FTP

Hi,

You have two options:

1) You can build a script on a server that connects to the box via FTP and 'downloads' the configuration file every n time using crontab.
This user should at least have 'maintenance' privileges to download the configuration:

class backup-dudes {
permissions maintenance;

user backup-user {
uid xxx;
class backup-dudes;

2) You can have the router store a copy on the configuration file on each commit or every x minutes to a remote FTP server:

user at host# show system archival
configuration {
transfer-on-commit;
archive-sites {
"ftp://test:test123 at ftp.somehost.com";
}
}
For more options:

user at host# set system archival configuration ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these
+ groups
Post by Erdem Sener
archive-sites
transfer-interval Frequency at which file transfer happens
(15..2880 minutes)
transfer-on-commit Transfer after each commit


HTH
--
Erdem
Post by Erdem Sener
Dear ALL !
Please guide me, I need to take backup of my configuration file
through FTP
Regards !
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Loading...