Commit Graph

52 Commits

Author SHA1 Message Date
Michael Tremer
c7e0d73e7c backup: Make include/exclude files relative
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:23 +00:00
Michael Tremer
3f8e70f6b3 backup: Don't restore excluded files
Sometimes, we restore a backup that has been created earlier before
exclude files have been changed. To avoid overwriting those files, we
will consider the exlude list upon restore.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:20 +00:00
Michael Tremer
fc717041c4 backup: Abort when the backup could not be extracted
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:14 +00:00
Peter Müller
86cf6898aa Merge branch 'master-IDSv3' into temp-c164-development 2022-01-14 14:05:10 +00:00
Stefan Schantl
4aa1382e22 backup.pl: Launch convert-ids-multiple-providers if neccessary.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Michael Tremer
45a5df5a5e backup: Fork ISO job into the background in CGI script
In order to be able to run the ISO command on command line it is helpful
that the script does not go into background halfway through the process.

We should rather start it as a background job straight from the CGI
script.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-14 14:39:26 +01:00
Michael Tremer
51ed815f5e backup: Create tarball in one pass
This patch is changing the behaviour of the backup script so that it
creates one tarball and compresses it in one go.

This will save storing the original tarball on disk before compressing
it which on my test system requires significant disk space.

This patch also solves a bug where the backup file included with the ISO
image could not be extracted because it was not gzip-compressed when it
was expected to be.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-14 14:39:21 +01:00
Michael Tremer
d9db91609f backup: Use filename as specified on console
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-14 14:39:17 +01:00
Adolf Belka
e5f3e0397c backup.pl: Fix #12626 backup/include.user entries will not override backup/exclude
- Current situation is that any restrictions in the exclude file will not
   be overwritten by the include.user file
- For example the global exclude file has *.tmp preventing any tmp files
   being backed up from the globally included IPFire files
   If a user has some specific tmp files they want to backup and include
   them in the include.user file they will not override the global
   exclude file.
- This fix does the backup of the global and user backups as two separate
   events and then appends them. This means that any tmp files in the
   include.user file will be backed up.
- The backups are created as a global tar file and then have the user
   tar file appended and then the combined file gzipped and given the .ipf
   suffix. This has to be done this was as gzipped files can not be
   appended to each other whereas tar files can.

Fixes: 12626
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-25 09:43:57 +00:00
Stefan Schantl
f1d982cce6 Add convert-to-location converter.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-15 18:21:57 +02:00
Arne Fitzenreiter
34b7b98616 core144: add dhcpcd initskript and user
this commit also re/create the user after backup restore.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-19 17:39:47 +00:00
Arne Fitzenreiter
5562f26f69 vnstat: remove wrong tag file
fixes #12305

I had created this tag file to ship the folder but vnstat doesn't like empty files.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 17:56:23 +00:00
Arne Fitzenreiter
6df8a22b8a core141: correct move of nobeeps flag
in core139 there was a syntax error, and it was missed in
backup converter also.

fixes #12273

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-26 13:07:08 +01:00
Michael Tremer
ecbf66761f DNS: Add converter to migrate settings
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 10:43:19 +00:00
Tim FitzGeorge
28797d488e Restart logging after restoring backup
Send SIGHUP to syslogd and suricata after restoring backup.  This ensures that
if the restored backup includes log files that any new log messages get
appended to the restored log files.  Otherwise they will be written to the
old log files which are pending deletion.

httpd is told to restart using apachectl, which is the equivalent of sending
a signal. 'graceful' (USR1) is used rather than 'restart' (HUP) because the
latter immediately kills the process restoring the backup, preventing
converters from running.

Fixes: 12196
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:27:54 +00:00
Michael Tremer
175f5c060e backup: Allow passing name of tarball for creation/restore
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-04-16 13:22:10 +01:00
Stefan Schantl
8c27372438 backup.pl: Run snort to suricata converter when a backup gets restored.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-01-29 08:40:34 +01:00
Michael Tremer
4f10c0b3a3 backup: Fix expanding glogging
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-11-01 10:27:09 +00:00
Michael Tremer
c7b7a70deb backup: Rewrite backup script
The old script was quite messy and written in perl although
it was only calling shell commands.

This version is now written in shell although keeping the .pl
file suffix and is a drop-in replacement.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-10-31 14:22:56 +00:00
Michael Tremer
a6c190818a backup: Fix deleting backup files
Signed-off-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:21:41 +01:00
Matthias Fischer
84578512f5 Fixes for 'backup.pl' (Bug #11816)
Hi,

Fixes #11816
(https://bugzilla.ipfire.org/show_bug.cgi?id=11816 and
https://bugzilla.ipfire.org/attachment.cgi?id=608):

"[root@ipfire ~]# backupctrl exclude
...
tar: The following options were used after any non-optional arguments in
archive create or update mode.  These options are positional and affect
only arguments that follow them.  Please, rearrange them properly.
tar: --exclude-from '/var/ipfire/backup/exclude.user' has no effect
tar: Exiting with failure status due to previous errors"

Please test - I got no errors anymore.

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-14 20:38:47 +01:00
Arne Fitzenreiter
5604dc748d backup: make include file parsing more robust. 2015-03-06 17:22:18 +01:00
Arne Fitzenreiter
2b4593b27f backup.pl: remove wrong curly bracket. 2014-02-04 16:01:43 +01:00
Michael Tremer
9063a04e94 Merge branch 'master' into fifteen
Conflicts:
	config/backup/backup.pl
2014-01-09 13:31:25 +01:00
Michael Tremer
59cbe38697 backup: Convert backups with old CCD files. 2014-01-09 12:31:31 +01:00
Alexander Marx
cbc6219852 Firewall: Fix typo in backup script which stops the conversion of old firewallrules 2013-11-08 13:41:25 +01:00
Alexander Marx
8039a71099 Firewall: renamed forwardfwctrl to firewallctrl 2013-10-24 09:42:42 +02:00
Alexander Marx
6d8eb5dec7 Firewall: Renamed directory /var/ipfire/forward to /var/ipfire/firewall 2013-10-24 09:24:12 +02:00
Alexander Marx
e09884e04f Forward Firewall: some fixes:
1) Counter was not correctly decreased when deleting a network from a customgroup
2) Convert-outgoingfw improved
3) Backup didn't set filepermissions correctly
2013-08-09 14:12:39 +02:00
Alexander Marx
f7e649ddfb Forward Firewall: some typos in dmz-converter 2013-08-09 14:12:39 +02:00
Alexander Marx
a60dbb4b6a Forward Firewall: added dmz-converter.
Also extended backup.pl script to support old backups. Now it is possible to restore old backups into new firewall. On restore, all config files of new firewall will be destroyed and the 4 converters will recreate them.
2013-08-09 14:12:37 +02:00
Alexander Marx
9edb1d7a8e Forward Firewall: edited Backup.pl. If someone put /var/ipfire/outgoing into /var/ipfire/backup/include, the rules are backed up and need to be restored.
Now the backup takes care of this and checks if there are old rules to convert.
2013-08-09 14:08:13 +02:00
Alexander Marx
99e698d033 Forward Firewall: Minor changes...
1) improved convert-outgoingfw. source was wrong when tun+ interface
2) target had always a ":" in ruletable
3) convert-outgoingfw bugfix: ports where not cleared for next rule
2013-08-09 14:08:12 +02:00
Alexander Marx
e0800c21db Forward Firewall: Edited Backup.pl so that any old backups get converted to new firewall. Afterwards the directories /var/ipfire/outgoing and /var/ipfire/xtaccess are removed! 2013-08-09 14:08:12 +02:00
Alexander Marx
c490c6e802 Backup: added ovpn-ccd-converter script to restore. With this patch one is able to restore old backups and the openvpn clients get converted for new ccd-file 2013-01-07 15:36:27 +01:00
Christian Schmidt
cb13f50d50 Fixed backup not taking user files into account. 2011-03-15 18:28:07 +01:00
Christian Schmidt
c0faa0efaf Fixed all those tar --preserve errors present. 2010-02-20 12:41:57 +01:00
Daniel Glanzmann
b90a7e56fe added option to download and delete iso backup 2008-10-01 15:43:22 +02:00
Daniel Glanzmann
f31d3c1f23 added backupiso to gui 2008-09-30 00:30:21 +02:00
maniacikarus
2a1f6aa7a8 corrected 2 cgi issues
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@1063 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-11-05 17:34:56 +00:00
maniacikarus
a609bfb075 corrected mpfire stream url
changed some directories for backup


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@1001 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-26 18:09:41 +00:00
maniacikarus
b8e5a9c576 Weiter am Backup gebastelt
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@979 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-19 16:21:32 +00:00
ms
30945c78a5 Kleinere fixes an der Backup Routine
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@977 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-18 19:51:15 +00:00
ms
5ad5a6bcd6 Korrekturen damit der Build wieder laeuft
MPFire fix damit der shuffle funktioniert
Backup der Addons weiter gebaut


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@975 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-16 18:35:15 +00:00
maniacikarus
901a50cfed MPFire CGI korrigiert
Backupfunktionen fuer Addons begonnen


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@974 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-15 19:36:15 +00:00
maniacikarus
75abe7e958 Fix fuer Backup mit IE6
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@934 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-01 19:58:00 +00:00
ms
70df830214 Ein Paar Dateien fuer die GPLv3 angepasst.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@853 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-29 13:25:32 +00:00
maniacikarus
a97442adcd Backup funktioniert jetzt auch via Webinterface
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@768 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-14 18:55:35 +00:00
maniacikarus
d39a5cb6ed Backupklamotte erweitert
Fehler im Disk Graphen gefixt
Kleine Anpassung am MPFire


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@712 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-07-19 17:08:25 +00:00
maniacikarus
69addbb810 Fuer den Urlfilter ein Background Image gemacht
MPFire erweitert
Samba Pagerefresh korrigiert
Tripwire Pagerefreh korrigiert
Backup CGI sollte jetzt fertig sein zum Testen
vpnmain die beiden SHA2 Crypts entfernt
Snort init nochmal angepasst damit die PID alleine angelegt wird


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@682 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-07-13 18:49:27 +00:00