How to delete old backups via SSH commands


(Vincent) #1

I rebooted by pbxact and got this

[root@uc-8****** ~]# fwconsole ma listonline
No repos specified, using: [commercial,unsupported,standard,extended] from last GUI settings

In GPG.class.php line 397:

Unable to trust the FreePBX Key! – {“stdout”:"",“stderr”:“gpg: error writi
ng to \/home\/asterisk\/.gnupg\/.#lk0x1******.uc-84******.12377': No space left on device\ngpg: Fatal: can't create lock for/home/asterisk/.gnup
g/trustdb.gpg’\n”,“status”:[],“exitcode”:2}

moduleadmin [-f|–force] [-d|–debug] [–edge] [–ignorecache] [–stable] [–col or] [–skipchown] [-e|–autoenable] [–skipdisabled] [–snapshot SNAPSHOT] [–fo rmat FORMAT] [-R|–repo REPO] [-t|–tag TAG] [–skipbreakingcheck] [–sendemail] [–onlystdout] [–] []…
[root@uc-84****** ~]# moduleadmin -f|–force
-bash: --force: command not found
-bash: moduleadmin: command not found

~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/SangomaVG-root 108G 108G 20K 100% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs 1.8G 8.7M 1.8G 1% /run
tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
/dev/sda1 1.9G 106M 1.7G 6% /boot
tmpfs 369M 0 369M 0% /run/user/0

fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000e8eca

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 4098047 2048000 83 Linux
/dev/sda2 4098048 250068991 122985472 8e Linux LVM

Disk /dev/mapper/SangomaVG-root: 115.7 GB, 115678904320 bytes, 225935360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/SangomaVG-swaplv1: 4160 MB, 4160749568 bytes, 8126464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

The backups are hogging all the space, and i can not adjust the files via gui
I can navigate to
[root@uc-84544609 backup]# du -h | sort -h
3.9M ./Default_backup
7.0G ./Glendale
43G ./POMPs_Full_Backup
but to show the files and delete any old back ups is unknown to me.

what do i do, what commands to type. i can SSH into the device. thanks for any help you can give


(Lorne Gaetz) #2

Backups are probably saved in:

/var/spool/asterisk/backup

in various folders. Remove files with:

rm <filename>

(Vincent) #3

POMPs_Full_Backup]# 43G ./POMPs_Full_Backup

I can get into that /var/spool/asterisk/backup folder, but i can’t seem to get into the ./POMPs_Full_Backup folder
are the backups in zip or bak files? how can i list those files to use the rm command?
I read this https://documentation.cpanel.net/display/CKB/How+to+Manage+your+Hard+Drive+Space
but i guess i need a more basic step by step to navigate directly to that folder to list the bak files


(Vincent) #4

The back ups ate up all the disk space and wouldnt allow the device to boot.
perhaps there should be a setting to limit the storage space for back up, not only how many runs. I couldn’t delete any backup files via gui

i had to get tech support to find the commands
df -h then ll then less ./backup
to select the tz file and then the rm command, but i wasnt able to delete the tz file, so i had to delete the sub directory for the back up. not fun.
Also somehow the pbxact device was downloading 12 copies of the new update packages for the last 3 weeks, many copies. so my device was a full as can be with junk and that crashed the boot up process. thankfully asterisk worked well when the rest of the processes couldnt load because of disk space, so phone calls could go on today.


(system) closed #5

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.